Submission #565827

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
5658272022-05-21 11:49:50almothana05Evacuation plan (IZhO18_plan)C++14
0 / 100
358 ms79836 KiB
#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];
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

plan.cpp: In function 'void bfs()':
plan.cpp:16:31: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<std::pair<long long int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   16 |       for(long long i = 0 ; i < gr[jet].size() ; i++){
      |                             ~~^~~~~~~~~~~~~~~~
plan.cpp: In function 'void dfs(long long int, long long int)':
plan.cpp:54:28: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   54 |    for(long long i = 0 ; i < kinder[x].size() ; i++){
      |                          ~~^~~~~~~~~~~~~~~~~~
#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...