# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
321570 | minoum | Jakarta Skyscrapers (APIO15_skyscraper) | C++17 | 498 ms | 262148 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 long long int ll;
const int MAXN = 3e4 + 5, inf = INT_MAX / 2;
int n, m, b[MAXN], p[MAXN], d[MAXN], cnt[MAXN], sz = 0;
vector <pair<int, int>> adj[MAXN];
set <pair<int,int>> all;
void dij(){
set <pair<int,int>> s;
for(int i = 0; i < n; i++) d[i] = inf;
d[b[0]] = 0;
s.insert({0,b[0]});
while(!s.empty()){
int v = s.begin()->second;
s.erase(*s.begin());
for(auto i: adj[v]){
int u = i.first, w = i.second;
if(d[u] > d[v] + w){
s.erase({d[u], u});
d[u] = d[v] + w;
s.insert({d[u], u});
}
}
}
return;
}
# | 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... |