# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
172707 | khohko | Employment (JOI16_employment) | C++17 | 27 ms | 504 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;
#define ll long long
#define ARRS ((ll)(4e5+100))
#define fr first
#define sc second
#define pb push_back
#define MX ((ll)(1e9+100))
#define MAX ((ll)(1e18+100))
int n,q;
int a[ARRS];
int up[ARRS];
int type[ARRS];
pair<int, int> compress[ARRS];
int fw[2*ARRS];
int quer(int idx){
int pas=0;
for(;idx;idx-=idx&-idx)
pas+=fw[idx];
return pas;
}
void updt(int idx, int val){
for(;idx<ARRS;idx+=idx&-idx)
fw[idx]+=val;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |