Borderou de evaluare (job #2909217)

Utilizator simion_bogdanSimion Bogdan-Dumitru simion_bogdan Data 9 iunie 2022 23:15:56
Problema Subsecventa de suma maxima Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:11:27: error: 'INT_MIN' was not declared in this scope 11 | int element[TOP],n,topSum=INT_MIN,currentSum=0,position,startPosition,finalPosition; | ^~~~~~~ main.cpp:3:1: note: 'INT_MIN' is defined in header '<climits>'; did you forget to '#include <climits>'? 2 | #include<algorithm> +++ |+#include <climits> 3 | main.cpp: In function 'int main()': main.cpp:22:7: error: 'currentSum' was not declared in this scope 22 | if (currentSum < 0) { | ^~~~~~~~~~ main.cpp:24:4: error: 'position' was not declared in this scope 24 | position = i; | ^~~~~~~~ main.cpp:29:16: error: 'currentSum' was not declared in this scope 29 | if (topSum < currentSum) { | ^~~~~~~~~~ main.cpp:31:4: error: 'startPosition' was not declared in this scope 31 | startPosition = position; | ^~~~~~~~~~~~~ main.cpp:31:20: error: 'position' was not declared in this scope 31 | startPosition = position; | ^~~~~~~~ main.cpp:32:4: error: 'finalPosition' was not declared in this scope 32 | finalPosition = i; | ^~~~~~~~~~~~~ main.cpp:36:27: error: 'startPosition' was not declared in this scope 36 | cout << topSum << " " << startPosition + 1 << " " << finalPosition + 1; | ^~~~~~~~~~~~~ main.cpp:36:55: error: 'finalPosition' was not declared in this scope 36 | cout << topSum << " " << startPosition + 1 << " " << finalPosition + 1; | ^~~~~~~~~~~~~ Non zero exit status: 1

Ceva nu functioneaza?