# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
697194 | _martynas | Toll (BOI17_toll) | C++11 | 95 ms | 17784 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
using vi = vector<int>;
struct Edge {
int v, w;
};
const int MXN = 5e4+5;
const int INF = 1e9;
int k, n, m, o;
// [a][b][c] = from a move 2^b blocks ahead to position = c (mod k)
int jump[MXN][16][5];
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cin >> k >> n >> m >> o;
for(int a = 0; a < n; a++)
for(int b = 0; b < 16; b++)
for(int c = 0; c < 5; c++)
jump[a][b][c] = INF;
for(int i = 0; i < m; i++) {
int u, v, w; cin >> u >> v >> w;
jump[u][0][v%k] = w;
}
# | 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... |