# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
49141 | rzbt | Poklon (COCI17_poklon) | C++14 | 683 ms | 85680 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 mp make_pair
#define pb push_back
#define F first
#define S second
#define all(x) x.begin(),x.end()
#define MAXN 500005
typedef long long ll;
using namespace std;
int n,q;
int niz[MAXN];
set<int> s;
map<int,int> m;
vector<int> sve[MAXN];
vector<pair<int,int>> qve[MAXN];
int res[MAXN];
int bit[MAXN];
void dodaj(int p,int x){
for(;p<MAXN;p+=(p&(-p)))
bit[p]+=x;
}
int zbir(int p){
int z=0;
for(;p>0;p-=(p&(-p)))
z+=bit[p];
return z;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |