# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
650508 | Andrei_Calota | Toll (BOI17_toll) | C++14 | 195 ms | 72148 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
const int NMAX = 5e4;
const int RMAX = 5;
const int LOG_MAX = 16;
const int INF = 1e9;
const int NONE = -1;
int r, n, m, q;
int groups;
static inline int group ( int node ) {
return node / r;
}
static inline int spot ( int node ) {
return node % r;
}
int cost[LOG_MAX][NMAX][RMAX][RMAX];
/// cost[p][g][rb][re] = costului minim
/// pentru un drum de lungime (1<<p) care incepe
/// din grupa g cu rest rb si se termina
/// in grupa g + (1<<p) - 1 cu rest re
void init_cost () {
for ( int g = 0; g < groups; g ++ )
for ( int rb = 0; rb < r; rb ++ )
for ( int re = 0; re < r; re ++ )
cost[0][g][rb][re] = INF;
}
void merge_answer ( int answer[RMAX][RMAX], int fh[RMAX][RMAX], int sh[RMAX][RMAX] ) {
# | 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... |