| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 38655 | 14kg | 게임 (IOI14_game) | C++11 | 569 ms | 9932 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
// SB Solution
#include "game.h"
#define N 1501
#define M 2048
int n, nn, d[M*2], tree_cnt[M*2];
void initialize(int _n) {
n = _n;
for (nn = 1; nn < n; nn *= 2);
for (int i = 1; i <= n; i++) tree_cnt[nn + i - 1] = 1;
for (int i = nn - 1; i >= 1; i--) {
tree_cnt[i] = tree_cnt[i * 2] + tree_cnt[i * 2 + 1];
d[i] = tree_cnt[i * 2] * tree_cnt[i * 2 + 1];
}
}
int hasEdge(int x, int y) {
x += nn, y += nn;
while (x != y) {
if (x > y) x /= 2;
else y /= 2;
} d[x]--;
return d[x] ? 0 : 1;
}
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
