Borderou de evaluare (job #2806991)
Utilizator | Data | 23 noiembrie 2021 11:43:15 | |
---|---|---|---|
Problema | Subsecventa de suma maxima | Status | done |
Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int main()':
main.cpp:10:26: error: 'INT_MIN' was not declared in this scope
10 | int n, value, max_sum = INT_MIN, current_sum = 0, start_pos = 0, end_pos = 0;
| ^~~~~~~
main.cpp:3:1: note: 'INT_MIN' is defined in header '<climits>'; did you forget to '#include <climits>'?
2 | #include <vector>
+++ |+#include <climits>
3 | using namespace std;
main.cpp:16:15: error: 'current_sum' was not declared in this scope
16 | if (value > current_sum + value) {
| ^~~~~~~~~~~
main.cpp:17:4: error: 'start_pos' was not declared in this scope; did you mean 'starts'?
17 | start_pos = i;
| ^~~~~~~~~
| starts
main.cpp:20:3: error: 'current_sum' was not declared in this scope
20 | current_sum = max(current_sum + value, value);
| ^~~~~~~~~~~
main.cpp:22:4: error: 'end_pos' was not declared in this scope
22 | end_pos = i;
| ^~~~~~~
main.cpp:26:31: error: 'end_pos' was not declared in this scope
26 | for (int i = 0; starts[i] <= end_pos; ++i) {
| ^~~~~~~
main.cpp:27:3: error: 'start_pos' was not declared in this scope; did you mean 'starts'?
27 | start_pos = starts[i];
| ^~~~~~~~~
| starts
main.cpp:29:28: error: 'start_pos' was not declared in this scope; did you mean 'starts'?
29 | fout << max_sum << ' ' << start_pos << ' ' << end_pos;
| ^~~~~~~~~
| starts
main.cpp:29:48: error: 'end_pos' was not declared in this scope
29 | fout << max_sum << ' ' << start_pos << ' ' << end_pos;
| ^~~~~~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !