# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
165354 | tneluccus | Werewolf (IOI18_werewolf) | C++14 | 923 ms | 97392 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 N cac
const int N=2e5+2;
vector<int> head[N];
int posL[N],bit[N],posR[N];
pair<int,int> idxL[N],idxR[N];
vector<int> adj[N];
vector<pair<int,int> > queryL[N],queryR[N],edgeL[N],edgeR[N];
vector<pair<pair<int,int>,pair<int,bool> > > lis[N];
void upd(int pos){
while(pos<N){
bit[pos]++;
pos+=(pos&-pos);
}
}
int get(int pos){
int sum=0;
while(pos){
sum+=bit[pos];
pos-=(pos&-pos);
}
return sum;
}
int getsum(int x,int y){
return get(y)-get(x-1);
}
int findd(int x){
if(head[x].size()>1){
return x;
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |