제출 #70879

#제출 시각아이디문제언어결과실행 시간메모리
70879zetapi전선 연결 (IOI17_wiring)C++14
13 / 100
50 ms14216 KiB
//#include <wiring.h> #include <bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair #define ll long long #define itr ::iterator typedef pair<int,int> pii; const int MAX=1e5; ll min_total_length(vector<int> r,vector<int> b) { ll res=0; if(r.size()<=b.size()) { for(int A=0;A<r.size();A++) res+=b[A]-r[A]; for(int A=r.size();A<b.size();A++) res+=b[A]-r.back(); return res; } else if(b.size()<=r.size()) { for(int A=0;A<b.size();A++) res+=b[A]-r[A]; for(int A=b.size();A<r.size();A++) res+=b[0]-r[A]; } return res; } /*signed main() { ios_base::sync_with_stdio(false); return 0; }*/

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

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