# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
245147 | m3r8 | Toll (BOI17_toll) | C++14 | 3081 ms | 34920 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <stdio.h>
#define N 100100
int bst[N][17][5];
int nm[N][17][5];
int adj[N][5];
int k,n;
int solve(int st, int en){
int mx = -1;
if(st == en)return 0;
if(st/k == en/k)return -1;
for(int i = 15;i>=0;i--){
if(nm[st][i][0]/k <= en/k){
for(int j = 0;j<k;j++){
int tmp = solve(nm[st][i][j],en);
if(tmp != -1){
if(bst[st][i][j] != -1){
if(mx == -1 || mx > bst[st][i][j] + tmp){
mx = bst[st][i][j] + tmp;
};
};
};
};
break;
};
};
return mx;
컴파일 시 표준 에러 (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... |