| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 398944 | shrimb | 경찰관과 강도 (BOI14_coprobber) | C++17 | 165 ms | 262148 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include"bits/stdc++.h"
using namespace std;
#define MAX_N 500
vector<int> adj[501];
int cur = 0, nig;
int start(int N, bool A[MAX_N][MAX_N]) {
for (int i = 0 ; i < N ; i++) {
for (int j = 0 ; j < N ; j++) {
if (A[i][j]) adj[i].push_back(j);
}
}
return 0;
}
bool check (int c, int p) {
bool res = 0;
for (int i : adj[c]) {
if (i == nig) return 1;
res |= check(i, c);
}
return res;
}
int nextMove(int R) {
nig = R;
for (int i : adj[cur]) {
if (i == R || check(i, cur)) return i;
}
}
// don't modify the main function
// int main() {
// int N;
// cin >> N;
// bool A[MAX_N][MAX_N];
// for (int i = 0; i < N; i++) {
// for (int j = 0; j < N; j++) {
// cin >> A[i][j];
// }
// }
// int P = start(N,A);
// cout << P << endl;
// int R;
// cin >> R;
// while (true) {
// if (P == R) break;
// P = nextMove(R);
// cout << P << endl;
// if (P == R) break;
// cin >> R;
// }
// }
컴파일 시 표준 에러 (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... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
