# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
157172 | easrui | Employment (JOI16_employment) | C++14 | 355 ms | 11912 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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... |