# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
900503 | Dec0Dedd | The Potion of Great Power (CEOI20_potion) | C++14 | 1804 ms | 86432 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
const int N = 8e5+10;
const int INF = 1e9;
int n, d, h[N], a[N], b[N], c;
vector<pii> T[N];
void init(int _n, int _d, int _h[]) {
n=_n, d=_d;
for (int i=0; i<n; ++i) h[i]=_h[i];
}
void add(int v, int l, int r, int ql, int qr, int x, int y) {
if (l > qr || r < ql) return;
if (l >= ql && r <= qr) {
T[v].push_back({x, h[y]});
T[v].push_back({y, h[x]});
return;
} int m=(l+r)/2;
add(2*v, l, m, ql, qr, x, y), add(2*v+1, m+1, r, ql, qr, x, y);
}
void curseChanges(int sz, int _a[], int _b[]) {
c=sz;
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |