Submission #94104

#TimeUsernameProblemLanguageResultExecution timeMemory
94104fjzzq2002Jousting tournament (IOI12_tournament)C++14
0 / 100
1077 ms1260 KiB
#include <bits/stdc++.h> using namespace std; #define pb push_back int GetBestPosition(int N, int C, int R, int *K, int *S, int *E) { int mx=0; for(int i=0;i<N;++i) { vector<int> v; for(int j=0;j<i;++j) v.pb(K[j]); v.pb(R); for(int j=i;j<N-1;++j) v.pb(K[j]); int aa=0; for(int j=0;j<C;++j) { int mx=-1; for(int k=1;k<=E[j]-S[j]+1;++k) { mx=max(mx,v[S[j]]); v.erase(v.begin()+S[j]); } aa+=(mx==R); v.insert(v.begin()+S[j],mx); } mx=max(mx,aa); } return mx; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...