# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
149330 | rkm0959 (#200) | Bulb Game (FXCUP4_bulb) | C++17 | 72 ms | 7828 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
bool bad(int x, vector<int>&L, vector<int>&R){
x=R[x];
while(x>=0)
x=L[x];
return x==-2;
}
bool ok(int x, vector<int>&L, vector<int>&R){
x=R[x];
while(x>=0)
{
if(bad(x,L,R)) return 0;
x=L[x];
}
return x==-1;
}
bool existover2(int now,int dep, vector<int>&L, vector<int>&R){
if(now<0) return 0;
if(dep>2) return 1;
return existover2(L[now],dep,L,R) or existover2(R[now],dep+1,L,R);
}
bool changeok(int now, vector<int>&L, vector<int>&R){
now=R[now];
while(now>=0) now=L[now];
컴파일 시 표준 에러 (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... |