# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1123065 | ro9669 | Construction Project 2 (JOI24_ho_t2) | C++17 | 2087 ms | 5412 KiB |
#include <bits/stdc++.h>
#define fi first
#define se second
#define all(v) v.begin() , v.end()
#define sz(v) int(v.size())
#define unq(v) sort(all(v)); v.resize(unique(all(v)) - v.begin());
using namespace std;
typedef long long ll;
typedef pair<int , int> ii;
typedef pair<long long , int> lli;
const int maxN = int(2e5)+7;
int n , m , s , t;
ll l , k;
vector<pair<int , ll>> g[maxN];
ll d[maxN];
void dijkstra(){
for (int i = 1 ; i <= n ; i++) d[i] = k + 1;
d[s] = 0;
priority_queue<lli , vector<lli> , greater<lli>> pq;
pq.push({d[s] , s});
while (pq.empty() == 0){
ii it = pq.top(); pq.pop();
int u = it.se;
if (d[u] != it.fi) continue;
for (auto e : g[u]){
int v = e.fi;
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... |