제출 #96984

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
969842019-02-13 06:59:58E869120꿈 (IOI13_dreaming)C++14
18 / 100
171 ms20216 KiB
#include "dreaming.h"
#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> >X[1<<18]; vector<int> J[1<<18], G;
int N, M, L, col[1<<18], cnts, dist[1<<18];
void dfs(int pos){
if(col[pos]>=1) return;
col[pos]=cnts; J[cnts].push_back(pos);
for(int i=0;i<X[pos].size();i++) dfs(X[pos][i].first);
}
void getdist(int pos){
for(int i:J[col[pos]]) dist[i]=(1<<30);
queue<int>que; que.push(pos); dist[pos]=0;
while(!que.empty()){
int p = que.front(); que.pop();
for(int i=0;i<(int)X[p].size();i++) {
int to = X[p][i].first;
if(dist[to]>dist[p]+X[p][i].second){
dist[to]=dist[p]+X[p][i].second;
que.push(to);
}
}
}
}
pair<int, int> radius(int pos){
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

dreaming.cpp: In function 'void dfs(int)':
dreaming.cpp:11:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i=0;i<X[pos].size();i++) dfs(X[pos][i].first);
              ~^~~~~~~~~~~~~~
dreaming.cpp: In function 'std::pair<int, int> radius(int)':
dreaming.cpp:39:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i=0;i<A1.size();i++){if(dist[EA]==A1[i]+A2[i]) ret=min(ret,max(A1[i],A2[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...
#Verdict Execution timeMemoryGrader output
Fetching results...