# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
16729 | CodingBug | Jousting tournament (IOI12_tournament) | C++98 | 110 ms | 10896 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <stdio.h>
#include <algorithm>
#define M 100000
using namespace std;
struct IdxTree{
int a[1<<18],l,n;
void init(int N){
n=N;
for(l=1;l<n;l<<=1) ;
for(int i=0;i<n;i++) update(i,1);
}
void update(int x,int d){
for(int i=x+l;i;i>>=1) a[i]+=d;
}
int getNum(int x){
int i;
for(i=1;i<l;){
i*=2;
if(a[i]<=x){
x-=a[i];
i++;
}
}
if(i-l>=n) return n;
return i-l;
}
} itr;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |