# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
877187 | vjudge1 | Examination (JOI19_examination) | C++17 | 3063 ms | 44340 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 6e5 + 10, MOD = 1e9 + 7;
int n,q,s[N],t[N],x[N],y[N],z[N],sm[N],res[N];
vector<int> a,p,qq;
struct segtree{
int t[N * 4];
void build(int v = 1,int tl = 1,int tr = N){
t[v] =0 ;
if(tl == tr) return;
int tm = (tl + tr) >> 1;
build(v + v,tl,tm);
build(v + v + 1,tm + 1,tr);
}
void upd(int pos,int val,int v = 1,int tl = 1,int tr = N){
if(tl == tr){
t[v] += val;
}else{
int tm = (tl + tr) >> 1;
if(pos <= tm) upd(pos,val,v+v,tl,tm);
else upd(pos,val,v+v+1,tm+1,tr);
t[v] = t[v + v] + t[v + v + 1];
}
}
int get(int l,int r,int v = 1,int tl = 1,int tr = N){
if(l > r || tl > r || l > tr) return 0;
if(tl >= l && tr <= r) return t[v];
int tm = (tl + tr) >> 1;
컴파일 시 표준 에러 (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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |