# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
340414 | 8e7 | Toll (BOI17_toll) | C++14 | 255 ms | 160348 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.
//Challenge: Accepted
#include <iostream>
#include <algorithm>
#include <utility>
#include <vector>
#define maxn 50005
#define int long long
using namespace std;
const int inf = (1<<30) - 1;
struct mat{
int m[5][5];
mat() {
for (int i = 0;i < 5;i++) {
for (int j = 0;j < 5;j++) m[i][j] = inf;
}
}
};
void print(mat a) {
for (int i = 0;i < 5;i++) {
for (int j = 0;j < 5;j++) cerr << a.m[i][j] << " ";
cerr << endl;
}
}
mat comb(mat a, mat b) {
mat ret;
for (int i = 0;i < 5;i++) {
for (int j = 0;j < 5;j++) {
ret.m[i][j] = inf;
for (int k = 0;k < 5;k++) ret.m[i][j] = min(ret.m[i][j], a.m[i][k] + b.m[k][j]);
}
# | 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... |