# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
933250 | 2024-02-25T10:14:33 Z | SmuggingSpun | 동굴 (IOI13_cave) | C++14 | 1 ms | 604 KB |
#include "cave.h" #include<bits/stdc++.h> using namespace std; const int lim = 5e3 + 5; int S[lim], D[lim]; bitset<lim>vis; void exploreCave(int n){ vis.reset(); for(int i = 0; i < n; i++){ for(int j = 0; j < n; j++){ if(!vis.test(j)){ S[j] = 0; } } if(tryCombination(S) != i){ for(int j = 0; j < n; j++){ if(!vis.test(j)){ S[j] = 1; } } } int low = 0, high = n - 1, ans; while(low <= high){ int mid = (low + high) >> 1; for(int j = 0; j <= mid; j++){ if(!vis.test(j)){ S[j] ^= 1; } } if(tryCombination(S) == i){ high = (ans = mid) - 1; } else{ low = mid + 1; } for(int j = 0; j <= mid; j++){ if(!vis.test(j)){ S[j] ^= 1; } } } D[ans] = i; vis.set(ans); } answer(S, D); }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 604 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 600 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 348 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 348 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 604 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |