# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
105714 | Pro_ktmr | Employment (JOI16_employment) | C++14 | 1018 ms | 22580 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
#define LL long long
#define MP(a,b) make_pair(a,b)
struct SegmentTree{
private:
int N;
vector<int> node,lazy;
public:
void init(int n){
N = 1;
while(N < n) N *= 2;
N = 2*N-1;
node.clear();
lazy.clear();
for(int i=0; i<N; i++) node.push_back(0);
for(int i=0; i<N; i++) lazy.push_back(0);
}
void eval(int k, int l, int r){
if(lazy[k] == 0) return;
node[k] += (r-l)*lazy[k];
if(r-l != 1){
lazy[2*k+1] += lazy[k];
lazy[2*k+2] += lazy[k];
}
lazy[k] = 0;
}
void update(int a, int b, int x, int k=0, int l=0, int r=-1){
if(r == -1) r = (N+1) / 2;
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |