제출 #206282

#제출 시각아이디문제언어결과실행 시간메모리
206282achibasadzishvili전선 연결 (IOI17_wiring)C++17
13 / 100
43 ms3872 KiB
#include "wiring.h" #include<bits/stdc++.h> #define ll long long #define f first #define s second #define pb push_back using namespace std; ll min_total_length(vector<int>a , vector<int>b){ ll n = (ll)a.size() , m = (ll)b.size(); ll l = b[0] - a[n - 1],sa = 0 , sb = 0; for(int i=0; i<a.size(); i++) sa += a[i]; for(int i=0; i<b.size(); i++) sb += b[i]; return n * a[n - 1] - sa + sb - m * b[0] + max(n , m) * l; }

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

wiring.cpp: In function 'long long int min_total_length(std::vector<int>, std::vector<int>)':
wiring.cpp:12:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int i=0; i<a.size(); i++)
                  ~^~~~~~~~~
wiring.cpp:14:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int i=0; 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...