Borderou de evaluare (job #2939898)
Utilizator | Data | 14 noiembrie 2022 13:18:19 | |
---|---|---|---|
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:16:45: error: conflicting declaration 'int DP [0]'
16 | int a,b,c,n,max;fin>>n>>max;int DP[n+1],DP[0]=max;
| ^~
main.cpp:16:37: note: previous declaration as 'int DP [(n + 1)]'
16 | int a,b,c,n,max;fin>>n>>max;int DP[n+1],DP[0]=max;
| ^~
main.cpp:17:21: error: 'i' was not declared in this scope
17 | for(a=1;fin>>DP[i];++a){
| ^
main.cpp:19:9: warning: this 'else' clause does not guard... [-Wmisleading-indentation]
19 | else b=a+1;y=DP[i];
| ^~~~
main.cpp:19:20: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'else'
19 | else b=a+1;y=DP[i];
| ^
main.cpp:19:20: error: 'y' was not declared in this scope
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !