# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
565827 | almothana05 | Evacuation plan (IZhO18_plan) | C++14 | 358 ms | 79836 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 mod 1000000007
//////////////////////////////////////////////////////////
#define inf 100000000000000000
using namespace std;
vector<pair<long long , long long > >gr[300000];
priority_queue<pair<long long , long long> >q;
vector<long long>kinder[300000] , pow2;
vector<vector<long long> >mst;
long long dis[300000] , f[300000] , fa[300000] , lift[300000][20];;
long long menge , numm , nummer , que , ed , npp , cmp;
void bfs(){
while(q.size()){
long long jet = q.top().second , cmp = -q.top().first;
q.pop();
for(long long i = 0 ; i < gr[jet].size() ; i++){
if(cmp + gr[jet][i].second < dis[gr[jet][i].first]){
dis[gr[jet][i].first] = cmp + gr[jet][i].second;
q.push({-dis[gr[jet][i].first] , gr[jet][i].first});
}
}
}
}
long long fater(long long x){
if(f[x] == x){
return x;
}
f[x] = fater(f[x]);
return f[x];
}
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... |