| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 53440 | ainta | 장난감 기차 (IOI17_train) | C++17 | 1898 ms | 1136 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "train.h"
#include<cstdio>
#include<algorithm>
using namespace std;
int n, m, D[5010], TD[5010];
vector<int> who_wins(vector<int> a, vector<int> r, vector<int> u, vector<int> v) {
n = a.size();
m = u.size();
int i, j, k;
for (i = 0; i < n; i++) {
if (r[i] == 1)D[i] = 0;
else D[i] = -1e9;
if (a[i] == 1)TD[i] = -1e9;
else TD[i] = 1e9;
}
for (i = 0; i <=n+n; i++) {
for (j = 0; j < m; j++) {
int t = D[v[j]] + 1;
if (r[u[j]])t = max(t, 0);
if (a[u[j]] == 1) {
TD[u[j]] = max(TD[u[j]], t);
}
else {
TD[u[j]] = min(TD[u[j]], t);
}
}
for (j = 0; j < n; j++) {
D[j] = TD[j];
if (a[j] == 1)TD[j] = -1e9;
else TD[j] = 1e9;
}
}
vector<int>res(n);
for (j = 0; j < n; j++) {
if (D[j] >= n)res[j] = 1;
else res[j] = 0;
}
return res;
}
컴파일 시 표준 에러 (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... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
