QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#65688 | #4585. Greedy Knapsack | ZhangYiDe | Compile Error | / | / | C++98 | 1.1kb | 2022-12-02 21:45:27 | 2022-12-02 21:45:28 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
Details
answer.code: In function ‘int main()’: answer.code:40:26: error: ‘t’ does not name a type; did you mean ‘tm’? 40 | for(auto t:o)mp[t.fi]=max(mp[t.fi],t.se); | ^ | tm answer.code:40:58: error: expected ‘;’ before ‘if’ 40 | for(auto t:o)mp[t.fi]=max(mp[t.fi],t.se); | ^ | ; 41 | if(w[i]<=l)l-=w[i],r-=w[i],sum+=v[i]; | ~~ answer.code:41:17: error: expected primary-expression before ‘if’ 41 | if(w[i]<=l)l-=w[i],r-=w[i],sum+=v[i]; | ^~ answer.code:40:58: error: expected ‘;’ before ‘if’ 40 | for(auto t:o)mp[t.fi]=max(mp[t.fi],t.se); | ^ | ; 41 | if(w[i]<=l)l-=w[i],r-=w[i],sum+=v[i]; | ~~ answer.code:41:17: error: expected primary-expression before ‘if’ 41 | if(w[i]<=l)l-=w[i],r-=w[i],sum+=v[i]; | ^~ answer.code:40:58: error: expected ‘)’ before ‘if’ 40 | for(auto t:o)mp[t.fi]=max(mp[t.fi],t.se); | ~ ^ | ) 41 | if(w[i]<=l)l-=w[i],r-=w[i],sum+=v[i]; | ~~ answer.code:45:18: error: ‘t’ does not name a type; did you mean ‘tm’? 45 | for(auto t:mp)res=max(res,t.se); | ^ | tm answer.code:45:41: error: expected ‘;’ before ‘cout’ 45 | for(auto t:mp)res=max(res,t.se); | ^ | ; 46 | cout<<res; | ~~~~ answer.code:47:9: error: expected primary-expression before ‘return’ 47 | return 0; | ^~~~~~ answer.code:46:19: error: expected ‘)’ before ‘return’ 46 | cout<<res; | ^ | ) 47 | return 0; | ~~~~~~ answer.code:45:12: note: to match this ‘(’ 45 | for(auto t:mp)res=max(res,t.se); | ^