# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
411079 | alireza_kaviani | Cake 3 (JOI19_cake3) | C++11 | 1002 ms | 26708 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;
typedef pair<ll, ll> pll;
typedef pair<int, int> pii;
#define all(x) (x).begin(),(x).end()
#define X first
#define Y second
#define sep ' '
#define endl '\n'
#define SZ(x) ll(x.size())
const ll MAXN = (1 << 20);
const ll LOG = 20;
const ll INF = 8e18;
const ll MOD = 1e9 + 7; //998244353; //1e9 + 9;
ll n , m , curl = 1 , curr = 0 , V[MAXN] , C[MAXN] , val[MAXN] , ans[MAXN] , fen[2][MAXN];
vector<pll> vec , compress;
void add(int ind , int x , int val){
for(x++; x < MAXN ; x += x & -x) fen[ind][x] += val;
}
ll get(int ind , int x){
ll ans = 0;
for(x++; x ; x -= x & -x) ans += fen[ind][x];
return ans;
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... |