QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#68084 | #4585. Greedy Knapsack | ZhaoZiLong | Compile Error | / | / | C++98 | 1.1kb | 2022-12-14 16:30:18 | 2022-12-14 16:30:18 |
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<<endl; | ~~~~ answer.code:47:9: error: expected primary-expression before ‘return’ 47 | return 0; | ^~~~~~ answer.code:46:25: error: expected ‘)’ before ‘return’ 46 | cout<<res<<endl; | ^ | ) 47 | return 0; | ~~~~~~ answer.code:45:12: note: to match this ‘(’ 45 | for(auto t:mp)res=max(res,t.se); | ^