# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
143526 | kig9981 | Employment (JOI16_employment) | C++17 | 234 ms | 5636 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>
#ifdef NON_SUBMIT
#define TEST(n) (n)
#define tout cerr
#else
#define TEST(n) ((void)0)
#define tout cin
#endif
using namespace std;
int N, tree[400001], A[200000], x[400000], sz;
pair<int,int> Q[200000];
void update(int n, int v)
{
for(++n;n;n-=n&-n) tree[n]+=v;
}
int get_cnt(int n)
{
int ret=0;
for(++n;n<=400000;n+=n&-n) ret+=tree[n];
return ret;
}
void set_value(int i, int m)
{
int v=i==0;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |