Submission #315701

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
3157012020-10-23 17:11:40juggernautJousting tournament (IOI12_tournament)C++14
100 / 100
51 ms3320 KiB
/*
Try to solve
Solve it
AND NEVER BACK TO THIS PROBLEM AGAIN
*/
#include<bits/stdc++.h>
#ifdef EVAL
#else
#include"grader.cpp"
#endif
using namespace std;
const int Z=1<<17;
int nxt[Z],cnt[Z<<1],add[Z],res[Z];
int gt(int n){
int x=1;
while(x<Z){
x<<=1;
if(cnt[x]<n)n-=cnt[x++];
}
return x-Z;
}
void up(int x,int val){
while(x){
cnt[x]+=val;
x>>=1;
}
}
int GetBestPosition(int N,int C,int R,int *K,int *S,int *E){
int i,tmp,x,y,sum=0,mx=-1,id;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

tournament.cpp: In function 'int GetBestPosition(int, int, int, int*, int*, int*)':
tournament.cpp:30:17: warning: unused variable 'y' [-Wunused-variable]
   30 |     int i,tmp,x,y,sum=0,mx=-1,id;
      |                 ^
tournament.cpp:53:9: warning: 'id' may be used uninitialized in this function [-Wmaybe-uninitialized]
   53 |  return id;
      |         ^~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...