제출 #206281

#제출 시각아이디문제언어결과실행 시간메모리
206281achibasadzishvili전선 연결 (IOI17_wiring)C++17
컴파일 에러
0 ms0 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; } int main(){ ios::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: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++)
                  ~^~~~~~~~~
/tmp/ccfNeHp7.o: In function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/cclPzmOk.o:wiring.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status