제출 #1315096

#제출 시각아이디문제언어결과실행 시간메모리
1315096Agageldi동굴 (IOI13_cave)C++20
0 / 100
1 ms332 KiB
#include "bits/stdc++.h" // #include "grader.c" #include "cave.h" #define MAXN 500005 int dr[MAXN], n, vis[MAXN], st[MAXN]; void exploreCave(int N) { n = N; for(int i = 0; i < n; i++) { dr[i] = i; st[i] = 0; } for(int i = 0; i < n; i++) { int sw = 0; for(int j = 0; j < n; j++) { if(vis[j]) continue; int j1 = tryCombination(st); st[j] = 1 - st[j]; int j2 = tryCombination(st); if(j1 == i && j2 != i || j2 == i && j1 != i) { if(j1 == i) st[j] = 1- st[j]; vis[j] = 1; sw = j; break; } } vis[sw] = 1; dr[i] = sw; } answer(st, dr); }
#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...