제출 #67621

#제출 시각아이디문제언어결과실행 시간메모리
67621aquablitz11전선 연결 (IOI17_wiring)C++14
13 / 100
69 ms14288 KiB
#include <bits/stdc++.h> #include "wiring.h" using namespace std; using ll = long long; ll min_total_length(vector<int> r, vector<int> b) { ll ans = 0; for (int i = 1; i < r.size(); ++i) ans += i*1ll*(r[i]-r[i-1]); for (int i = 1; i < b.size(); ++i) ans += i*1ll*(b[b.size()-(i-1)-1]-b[b.size()-i-1]); ans += (b[0]-r[r.size()-1])*1ll*max(b.size(), r.size()); return ans; }

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

wiring.cpp: In function 'll min_total_length(std::vector<int>, std::vector<int>)':
wiring.cpp:9:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (int i = 1; i < r.size(); ++i)
                     ~~^~~~~~~~~~
wiring.cpp:11:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (int i = 1; i < b.size(); ++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...