# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
788613 | WLZ | Toll (BOI17_toll) | C++17 | 110 ms | 16580 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;
typedef pair<int, int> ii;
const int INF = 1e9;
template<typename T> inline istream& operator>>(istream &i, vector<T>& v) {
for (int j = 0; j < (int) v.size(); j++) i >> v[j];
return i;
}
template<typename T> inline ostream& operator<<(ostream &o, const vector<T>& v) {
for (int i = 0; i < (int) v.size(); i++) o << v[i] << ' ';
o << '\n';
return o;
}
struct node {
vector<vector<int>> mat;
node* left, *right;
int i, j;
};
vector<vector<int>> combine(const vector<vector<int>>& mat1, const vector<vector<int>>& mat2) {
if ((int) mat1.size() == 0) return mat2;
if ((int) mat2.size() == 0) return mat1;
int V = (int) mat1.size();
vector<vector<int>> newMat(V, vector<int>(V, INF));
for (int k = 0; k < V; k++) {
for (int i = 0; i < V; i++) {
for (int j = 0; j < V; j++) {
newMat[i][j] = min(newMat[i][j], mat1[i][k] + mat2[k][j]);
Compilation message (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... |