제출 #222907

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
2229072020-04-14 10:38:20MODDI악어의 지하 도시 (IOI11_crocodile)C++14
100 / 100
754 ms72352 KiB
#include "crocodile.h"
#include <bits/stdc++.h>
using namespace std;
int n, m, k;
vector<pair<int,int> > G[100010];
vector<int> exits;
int dijkstra()
{
int vis[n];
memset(vis,0,sizeof(vis));
priority_queue<pair<int,int> > pq;
for(int i=0;i<exits.size();i++)
{
int exit = exits[i];
pq.push(make_pair(0,exit));
vis[exit] = 1;
}
while(!pq.empty())
{
pair<int,int> state = pq.top(); pq.pop();
int path = -state.first;
int city = state.second;
//cout<<"at city "<<city<<" with path "<<path<<endl;
if(vis[city] == 0){
vis[city] = 1;
continue;
}
if(vis[city] == 2)
continue;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

컴파일 시 표준 에러 (stderr) 메시지

crocodile.cpp: In function 'int dijkstra()':
crocodile.cpp:12:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i=0;i<exits.size();i++)
              ~^~~~~~~~~~~~~
crocodile.cpp:36:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(int i=0;i<can_go.size();i++)
               ~^~~~~~~~~~~~~~
crocodile.cpp:45:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...