| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 255430 | super_j6 | 경찰관과 강도 (BOI14_coprobber) | C++14 | 0 ms | 384 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <queue>
#include <array>
using namespace std;
#define endl '\n'
#define ll long long
#define pi pair<int, int>
#define f first
#define s second
typedef array<int, 3> T;
const int mxn = 500;
int c;
int d[mxn][mxn], f[mxn][mxn];
bool vis[mxn][mxn][2];
queue<T> q;
int start(int n, bool g[mxn][mxn]){
for(int i = 0; i < n; i++)
for(int j = 0; j < n; j++)
for(int k = 0; k < n; k++){
d[i][j] += g[j][k];
}
for(int i = 0; i < n; i++)
for(int j = 0; j < 2; j++){
q.push({i, i, j});
}
while(!q.empty()){
T a = q.front();
q.pop();
for(int i = 0; i < n; i++){
if(a[2] && g[a[0]][i] && !vis[i][a[1]][0]){
vis[i][a[1]][0] = 1;
q.push({i, a[1], 0});
f[i][a[1]] = a[0];
}else if(!a[2] && g[a[1]][i] && !vis[a[0]][i][1] && -- d[a[0]][i] <= 0){
vis[a[0]][i][1] = 1;
q.push({a[0], i, 1});
}
}
}
}
int nextMove(int r){
return c = f[c][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... | ||||
