# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
109557 | nvmdava | Jousting tournament (IOI12_tournament) | C++17 | 202 ms | 3368 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
#define BIG 131072
int fen[BIG];
int in[BIG];
int p[BIG];
int last[BIG];
int ans[BIG];
int find(int v){
return in[v] == 1 ? v : p[v] = find(p[v]);
}
void upd(int loc){
while(loc < BIG){
fen[loc]++;
loc += loc & -loc;
}
}
int sum(int loc){
int res = 0;
while(loc){
res += fen[loc];
loc -= loc & -loc;
}
return res;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |