# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
593895 | FatihSolak | Toy Train (IOI17_train) | C++17 | 1437 ms | 1064 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "train.h"
#include <bits/stdc++.h>
#define N 5005
using namespace std;
int dp[N];
int ndp[N];
vector<int> adj[N];
vector<int> who_wins(vector<int> a, vector<int> r, vector<int> u, vector<int> v) {
int n = a.size();
int m = u.size();
for(int i = 0;i<m;i++){
adj[u[i]].push_back(v[i]);
}
for(int i=0;i<4*n;i++){
for(int j = 0;j<n;j++){
if(a[j]){
ndp[j] = -1e18;
for(auto u:adj[j]){
ndp[j] = max(ndp[j],dp[u] + r[j]*n - 1);
}
ndp[j] = min(ndp[j],n);
}
else{
ndp[j] = 1e18;
for(auto u:adj[j]){
ndp[j] = min(ndp[j],dp[u] + r[j]*n - 1);
}
if(ndp[j] <= 0){
ndp[j] = -1e9;
}
}
}
for(int j = 0;j<n;j++){
dp[j] = ndp[j];
}
}
vector<int> res(n);
for(int i = 0; i < n; i++){
res[i] = (dp[i] >= 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... |