제출 #72627

#제출 시각아이디문제언어결과실행 시간메모리
72627idan_izmirli전선 연결 (IOI17_wiring)C++14
13 / 100
52 ms14320 KiB
#include "wiring.h" using namespace std; long long inline mmin(long long a,long long b) { if(a<b) { return a; } return b; } long long min_total_length(std::vector<int> r, std::vector<int> b) { long long result=0; long long blue,red; for(int i=0;(i<r.size())||(i<b.size());i++) { if(i>=r.size()) { red=r[r.size()-1]; } else { red=r[i]; } if(i>=b.size()) { blue=b[0]; } else { blue=b[b.size()-1-i]; } result+=blue-red; } return result; }

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

wiring.cpp: In function 'long long int min_total_length(std::vector<int>, std::vector<int>)':
wiring.cpp:18:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i=0;(i<r.size())||(i<b.size());i++)
               ~^~~~~~~~~
wiring.cpp:18:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i=0;(i<r.size())||(i<b.size());i++)
                             ~^~~~~~~~~
wiring.cpp:20:7: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   if(i>=r.size())
      ~^~~~~~~~~~
wiring.cpp:28:7: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   if(i>=b.size())
      ~^~~~~~~~~~
#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...