# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1130052 | m_bezrutchka | Commuter Pass (JOI18_commuter_pass) | C++20 | 314 ms | 29888 KiB |
#include <bits/stdc++.h>
using namespace std;
#define int long long
typedef pair<int, int> pii;
typedef pair<int, pii> pip;
typedef pair<pii, int> ppi;
typedef pair<pii, pii> ppp;
const int LLINF = 2e18 + 10;
const int MAXN = 2e5 + 10;
int n, house, school;
vector<pii> adj[MAXN];
int dist_ini[2][MAXN];
bool mrk_ini[2][MAXN];
int dist[4][MAXN];
bool mrk[4][MAXN];
void dijkstra1(int t, int source) {
for (int i = 1; i <= n; i++) {
dist_ini[t][i] = LLINF;
}
dist_ini[t][source] = 0;
priority_queue<pii> pq;
pq.push({0, source});
while (!pq.empty()) {
auto [d, v] = pq.top();
pq.pop();
# | 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... |