# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
302708 | lohacho | 자동 인형 (IOI18_doll) | C++14 | 183 ms | 10644 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "doll.h"
#include <bits/stdc++.h>
using namespace std;
using LL = long long;
const int INF = (int)1e9 + 7;
const int NS = (int)2e5 + 4;
int lr[NS * 2];
vector<int> C;
vector<int> X, Y;
void make_tree(int num, int now, int to, int cnt){
X.push_back(0), Y.push_back(0);
if(now == to){
if(cnt - (1 << (to - now)) >= 0){
X[-num - 1] = -1;
}
return;
}
if(cnt - (1 << (to - now)) >= 0){
X[-num - 1] = -1;
Y[-num - 1] = -(int)Y.size() - 1;
make_tree(-(int)Y.size() - 1, now + 1, to, cnt - (1 << (to - now)));
}
else{
X[-num - 1] = -(int)X.size() - 1;
make_tree(-(int)X.size() - 1, now + 1, to, cnt);
Y[-num - 1] = -(int)Y.size() - 1;
make_tree(-(int)Y.size() - 1, now + 1, to, cnt - (1 << (to - now)));
# | 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... |