# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
989340 | eysbutno | Commuter Pass (JOI18_commuter_pass) | C++17 | 185 ms | 23740 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.
#pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = array<int, 2>;
#define all(x) begin(x), end(x)
#define sz(x) (int) (x).size()
template<class T> bool smax(T &a, T b) {
return a < b ? a = b, 1 : 0;
}
template<class T> bool smin(T &a, T b) {
return a > b ? a = b, 1 : 0;
}
constexpr ll INF = 1e18;
int main() {
cin.tie(0) -> sync_with_stdio(0);
int n, m;
cin >> n >> m;
pii a, b;
cin >> a[0] >> a[1] >> b[0] >> b[1];
--a[0], --a[1], --b[0], --b[1];
vector<vector<pii>> adj(n);
for (int i = 0; i < m; i++) {
int u, v, w;
cin >> u >> v >> w;
adj[--u].push_back({--v, w});
adj[v].push_back({u, 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... |