# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
786817 | SalihSahin | Addk (eJOI21_addk) | C++14 | 370 ms | 17380 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define pb push_back
#define fastio cin.tie(0); ios_base::sync_with_stdio(false);
#define int long long
using namespace std;
const int N = 1e5 + 5;
const int mod = 1e9+7;
const int inf = 3e18 + 5;
struct SegmentTree{
vector<int> tree;
void init(int n){
tree.resize(n*4);
}
void build(vector<int> &a, int v, int l, int r){
if(l == r) tree[v] = a[l];
else{
int m = (l + r)/2;
build(a, v*2, l, m);
build(a, v*2+1, m+1, r);
tree[v] = tree[v*2] + tree[v*2+1];
}
}
int query(int v, int l, int r, int tl, int tr){
if(l > r || r < tl || l > tr) return 0;
if(tl <= l && tr >= r) return tree[v];
컴파일 시 표준 에러 (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... |