# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1124568 | FucKanh | Plahte (COCI17_plahte) | C++20 | 283 ms | 38116 KiB |
#include<bits/stdc++.h>
#define ll long long
#define int ll
#define pii pair<int,int>
using namespace std;
class IT {
vector<int> t;
int _n;
public:
void init(int n) {
_n = n;
t.resize((n+2)*4,0);
}
void update(int v, int l, int r, int L, int R, int c) {
if (l==L && r == R) {
t[v] = c;
// cerr << "update: " << v << " " << l << " " << r << ": " << c << endl;
return;
}
if (L > R) return;
int mid = l + r >> 1;
update(v*2,l,mid,L,min(mid,R),c);
update(v*2+1,mid+1,r,max(L,mid+1),R,c);
}
int get(int v, int l, int r, int pos) {
if (l==r) return t[v];
int mid = l + r >> 1;
if (pos <= mid) {
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |