Submission #321570

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
3215702020-11-12 18:50:21minoumJakarta Skyscrapers (APIO15_skyscraper)C++17
57 / 100
498 ms262148 KiB
#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;
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...