# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
83334 | farukkastamonuda | Jakarta Skyscrapers (APIO15_skyscraper) | C++14 | 233 ms | 66236 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>
#define li 30005
#define inf 2000001000
#define md 1000000007
#define lo long long
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define ii pair<lo int,lo int>
using namespace std;
int n,m,B[li],P[li],dist[li];
set<int> S[li];
vector< pair<int,int> > v[li];
int vis[li];
priority_queue< pair<int,int> > q;
void bfs(){
for(int i=0;i<n;i++) dist[i]=inf;
q.push(mp(0,B[0]));
dist[B[0]]=0;
while(!q.empty()){
ii temp=q.top();
q.pop();
int seh=temp.se;
int cst=-temp.fi;
if(dist[seh]<cst) continue;
for(int i=0;i<(int)v[seh].size();i++){
int go=v[seh][i].fi;
int para=v[seh][i].se;
if(dist[go]>dist[seh]+para){
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... |