Borderou de evaluare (job #2505761)
Utilizator | Data | 7 decembrie 2019 10:48:34 | |
---|---|---|---|
Problema | Problema rucsacului | Status | done |
Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:6:1: error: expected ',' or ';' before 'pair'
pair<int,int>p[10001];
^~~~
main.cpp: In function 'int main()':
main.cpp:14:13: error: 'p' was not declared in this scope
in>>p[i].first>>p[i].second;
^
main.cpp:13:5: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
for(int i=1;i<=n;i++)
^~~
main.cpp:15:9: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'for'
for(int i=0;i<=n;i++)
^~~
main.cpp:20:28: error: 'p' was not declared in this scope
if(dp[i-1][j]>0 || p[i].first==j || (dp[i-1][j-p[i].first]>0 && j-p[i].first>0))
^
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !