제출 #57690

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
576902018-07-15 19:59:44alenam0161도시들 (IOI15_towns)C++17
0 / 100
27 ms4668 KiB
#include "towns.h"
#include <bits/stdc++.h>
using namespace std;
int hubDistance(int N, int sub) {
int f[1107][1107];
int d[1107][1107];
auto dis=[&](int x,int y){
if(x==y)return 0;
if(x>y)swap(x,y);
if(f[x][y]==false){
f[x][y]=true;
d[x][y]=getDistance(x,y);
}
return d[x][y];
};
int x=-1;
for(int i=1;i<N;++i){
if(x==-1||dis(0,x)<dis(0,i)){
x=i;
}
}
int y=-1;
for(int i=0;i<N;++i){
if(y==x)continue;
if(i==x)continue;
if(y==-1||dis(x,y)<dis(x,i)){
y=i;
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

towns.cpp: In function 'int hubDistance(int, int)':
towns.cpp:58:29: warning: conversion to 'int' from 'std::vector<int>::size_type {aka long unsigned int}' may alter its value [-Wconversion]
         int oth=qan[ds].size();
                 ~~~~~~~~~~~~^~
towns.cpp:65:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             if(qan[ds].size()>hx){
                ~~~~~~~~~~~~~~^~~
towns.cpp:67:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                     if(j>=qan[ds].size())ok=true;
                        ~^~~~~~~~~~~~~~~~
towns.cpp:50:6: warning: unused variable 'hwx' [-Wunused-variable]
  int hwx=1;
      ^~~
towns.cpp:6:28: warning: unused parameter 'sub' [-Wunused-parameter]
 int hubDistance(int N, int sub) {
                            ^~~
#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...