# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
310912 | vipghn2003 | Examination (JOI19_examination) | C++14 | 1308 ms | 92000 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 pii pair<int,int>
#define fi first
#define se second
#define mp make_pair
using namespace std;
const int N=1e5+5;
struct BIT2D
{
const int inf = 2e9;
int n;
vector<vector<int>>nodes,f;
void fakeUpdate(int u, int v)
{
for (int x = u; x > 0; x -= x & -x) nodes[x].push_back(v);
}
void fakeGet(int u, int v)
{
for (int x = u; x <= n; x += x & -x) nodes[x].push_back(v);
}
void update(int u, int v)
{
for (int x = u; x > 0; x -= x & -x)
{
for (int y = upper_bound(nodes[x].begin(), nodes[x].end(), v) - nodes[x].begin(); y > 0; y -= y & -y)
f[x][y]++;
}
}
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... |