Submission #992112

#TimeUsernameProblemLanguageResultExecution timeMemory
992112PedroBigManTraining (IOI07_training)C++14
Compilation error
0 ms0 KiB
vector<ll> thisdp(1<<S,0); REP(i,0,P) { A = costs[i].ff.ff; B = costs[i].ff.ss; C = costs[i].ss; ll valA = 0; if(A>=0) {valA=(1<<A);} ll valB = 0; if(B>=0) {valB=(1<<B);} ll rec = valA+valB; for(ll j = (1<<S) -1; j>=0; j--) { if(A>=0 && (j&valA)==0) {continue;} if(B>=0 && (j&valB)==0) {continue;} thisdp[j]=max(thisdp[j],thisdp[j-rec]+C); } } dp[s][S] = thisdp[(1<<S) -1]; REP(i,0,S) {dp[s][i]=thisdp[(1<<S)-1-(1<<i)];}

Compilation message (stderr)

training.cpp:1:2: error: 'vector' does not name a type
    1 |  vector<ll> thisdp(1<<S,0);
      |  ^~~~~~
training.cpp:2:12: error: expected constructor, destructor, or type conversion before '(' token
    2 |         REP(i,0,P)
      |            ^
training.cpp:15:9: error: 'dp' does not name a type
   15 |         dp[s][S] = thisdp[(1<<S) -1];
      |         ^~
training.cpp:16:12: error: expected constructor, destructor, or type conversion before '(' token
   16 |         REP(i,0,S) {dp[s][i]=thisdp[(1<<S)-1-(1<<i)];}
      |            ^