Submission #912903

#TimeUsernameProblemLanguageResultExecution timeMemory
912903Muhammad_AneeqJousting tournament (IOI12_tournament)C++17
0 / 100
13 ms3316 KiB
#include <vector> using namespace std; int GetBestPosition(int N, int C, int R, int K[], int S[], int E[]) { vector<int>co[N]={}; for (int i=0;i<C;i++) { co[S[i]].push_back(E[i]); co[E[i]].push_back(S[i]); } int ans=0,pos=0; for (int i=0;i<N;i++) { int z=0; for (auto j:co[i]) { if (R>K[j-(j>i)]) z++; else break; } if (z>ans) { ans=z; pos=i; } } return pos; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...