# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
998252 | _shr104 | Examination (JOI19_examination) | C++17 | 434 ms | 45300 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 int ll;
typedef long double ld;
#define pb push_back
#define pf push_front
#define fi first
#define se second
const ll mod = 1e9+7, mxn = 3e5+14;
struct point {ll x, y, z, v, i;};
struct cmp
{
bool operator() (point a, point b)
{
if (a.x != b.x) return a.x > b.x;
else if (a.v != b.v) return a.v > b.v;
else if (a.y != b.y) return a.y > b.y;
else if (a.z != b.z) return a.z < b.z;
return a.i < b.i;
}
};
struct binary_indexed_tree
{
ll b[mxn], n;
binary_indexed_tree() {}
binary_indexed_tree(ll _n) {n = _n; for (ll i = 0; i < mxn; i++) b[i] = 0;}
ll l_bit(ll x) {return x&(-x);}
void upd(ll x, ll v) {for (ll i = x; i > 0; i -= l_bit(i)) {b[i] += v;}}
ll get(ll x) {ll ans = 0; for (ll i = x; i <= mxn; i += l_bit(i)) {ans += b[i];} return ans;}
} bit;
# | 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... |