제출 #1310677

#제출 시각아이디문제언어결과실행 시간메모리
1310677aleksandre동굴 (IOI13_cave)C++20
0 / 100
102 ms480 KiB
#include "cave.h" #include <bits/stdc++.h> using namespace std; void exploreCave(int N) { int S[N]; int P[N]; for (int i = 0; i < N; i++) { S[i] = 0; P[i] = -1; } while (true) { int j = tryCombination(S); if (j == -1) break; for (int i = 0; i < N; i++) { if (find(P, P+N, i) != P+N) continue; int old = S[i]; S[i] = 1 - S[i]; int res = tryCombination(S); if (res > j) { P[j] = i; break; } else { S[i] = old; } } } answer(S, P); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...