제출 #848983

#제출 시각아이디문제언어결과실행 시간메모리
848983lbadea1000동굴 (IOI13_cave)C++17
46 / 100
23 ms604 KiB
#include "cave.h" void exploreCave(int N) { /* ... */ int s[N]; int poz[N]; bool ok[N]; for(int i = 0; i < N; i++) s[i] = 0, ok[i] = false, poz[i] = -1; int cnt = 0; while(cnt < N) { for(int i = 0; i < N; i++) if(ok[i] == false) s[i] = 0; int x; //= tryCombination(s); for(int i = 0; i < N; i++) { /*cout << "OK : "; for(int j = 0; j < N; j++) cout << ok[j] << ' '; cout << endl; cout << "POZ : "; for(int j = 0; j < N; j++) cout << poz[j] << ' '; cout << endl;*/ if(ok[i] == false) { x = tryCombination(s); if(x == -1) x = N; s[i] = 1; int y = tryCombination(s); if(y == -1) y = N; //cout << "TRY: " << y << endl; if(y > x) { ok[i] = true; s[i] = 1; poz[i] = x; cnt++; } else if(y < x) { ok[i] = true; s[i] = 0; poz[i] = y; cnt++; } //x = y; } } } answer(s, poz); }
#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...