# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
56962 | choikiwon | 즐거운 사진 수집 (JOI13_collecting) | C++17 | 2823 ms | 141288 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
int N, M, Q;
int Log[1 << 20];
pii mrg(pii a, pii b) {
if(a > b) swap(a, b);
if(a.first == b.first) return {a.first, a.second + b.second};
else return a;
}
struct BIT {
vector<pii> tree;
int level[20];
void init() {
tree = vector<pii>(4 * M);
build(0, M - 1, 1);
}
void build(int l, int r, int n) {
if(l == r) {
tree[n] = {0, 1};
return;
}
int m = (l + r)>>1;
build(l, m, 2*n);
build(m + 1, r, 2*n + 1);
Compilation message (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... |