# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
157172 | easrui | Employment (JOI16_employment) | C++14 | 355 ms | 11912 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 va first
#define vb second
using namespace std;
typedef pair<int,int> pii;
const int MN = 2e5+5;
int A[MN],G[MN],T[4*MN],N,M,S;
vector<int> V;
pii Q[MN];
void upt(int s, int e, int x, int y, int val, int pos)
{
//if(s==0 && e==S) cout << x << ' ' << y << ' ' << val << '\n';
if(e<x || y<s) return;
if(x<=s && e<=y){
T[pos] += val;
return;
}
int m = (s+e)/2;
upt(s,m,x,y,val,2*pos);
upt(m+1,e,x,y,val,2*pos+1);
}
int act(int s, int e, int x, int pos)
{
if(x<s || e<x) return 0;
if(s==e) return T[pos];
int m = (s+e)/2;
return T[pos]+act(s,m,x,2*pos)+act(m+1,e,x,2*pos+1);
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |