# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
524174 | nickmet2004 | Simple game (IZhO17_game) | C++11 | 162 ms | 11212 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>
#define int long long
using namespace std;
const int N = 1e6 + 5;
int n,m, a[N], F[2000005];
void upd(int i , int d){
while(i <= N){
F[i] += d;
i += i & -i;
}
}
int get(int i){
int s= 0;
while(i){
s += F[i] , i -= i&-i;
}
return s;
}
void M(int A , int p , int h){
if(A > h){
upd(h , +1);
if(a[p] >= A){
upd(a[p] + 1 , +1);
upd(A , -2);
}
else {
upd(a[p] , -1);
}
}else {
upd(h + 1 , -1);
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... |