# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
650015 | Clan328 | The Big Prize (IOI17_prize) | C++17 | 43 ms | 9024 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "prize.h"
#include <bits/stdc++.h>
using namespace std;
struct SegmentTree {
vector<int> t;
SegmentTree(int n) {
t = vector<int>(4*n);
}
int get(int v, int tl, int tr, int l, int r) {
if (l > r) return 0;
else if (tl == l && tr == r) return t[v];
else {
int tm = (tl+tr)/2;
return get(2*v, tl, tm, l, min(r, tm))+get(2*v+1, tm+1, tr, max(l, tm+1), r);
}
}
void update(int v, int tl, int tr, int pos) {
if (tl == tr) t[v]++;
else {
int tm = (tl+tr)/2;
if (pos <= tm) update(2*v, tl, tm, pos);
else update(2*v+1, tm+1, tr, pos);
t[v] = t[2*v]+t[2*v+1];
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |