제출 #72873

#제출 시각아이디문제언어결과실행 시간메모리
72873SmsS전선 연결 (IOI17_wiring)C++14
13 / 100
44 ms2156 KiB
#include<bits/stdc++.h> using namespace std; #define for2(a,b,c) for(int a=b;a<c;a++) #define ll long long #include "wiring.h" long long min_total_length(std::vector<int> r, std::vector<int> b) { ll res = 0; int L = 0; int R = b.size()-1; while(L != r.size() && R != -1){ res += b[R]-r[L]; L++; R--; } while(R != -1){ res += b[R]-r[L-1]; R--; } while(L != r.size()){ res += b[R+1]-r[L]; L++; } return res; }

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

wiring.cpp: In function 'long long int min_total_length(std::vector<int>, std::vector<int>)':
wiring.cpp:11:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  while(L != r.size() && R != -1){
        ~~^~~~~~~~~~~
wiring.cpp:20:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  while(L != r.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...