# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
274681 | Saboon | Ideal city (IOI12_city) | C++14 | 87 ms | 12660 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;
typedef long long ll;
const int maxn = 1e5 + 10;
const int mod = 1e9;
int n, p[maxn], par[maxn], lef[maxn], rig[maxn];
vector<int> t[maxn];
int answer = 0;
int Sum = 0, Num = 0;
int SZ;
int fen1[maxn], fen2[maxn];
void vitex(){
Sum = Num = 0;
for (int i = 1; i <= SZ; i++)
fen1[i] = fen2[i] = 0;
}
pair<int,int> get(int idx){
int ret = 0, ted = 0;
for (; idx; idx -= idx & -idx){
ret = (ret + fen1[idx]) % mod;
ted = (ted + fen2[idx]);
}
return {ret,ted};
}
# | 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... |