# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
853327 | serifefedartar | 원숭이와 사과 나무 (IZhO12_apple) | C++17 | 244 ms | 214404 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
#define fast ios::sync_with_stdio(0);cin.tie(0);
#define s second
#define f first
typedef long long ll;
const ll MOD = 1e9 + 7;
const ll LOGN = 20;
const ll MAXN = 1e5 + 5;
struct Node {
int l, r, sum;
bool lazy;
int left, right;
Node(int a, int b) : l(a), r(b), sum(0), lazy(0), left(-1), right(-1) { }
Node() : l(-1), r(-1), sum(0), lazy(0), left(-1), right(-1) { }
};
Node sg[90*MAXN];
int no = 2;
void add(int x) {
if (sg[x].left == -1 && sg[x].l != sg[x].r) {
int mid = (sg[x].l + sg[x].r) / 2;
sg[x].left = no;
sg[x].right = no+1;
sg[no++] = Node(sg[x].l, mid);
sg[no++] = Node(mid+1, sg[x].r);
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |