Submission #206280

#TimeUsernameProblemLanguageResultExecution timeMemory
206280achibasadzishviliWiring (IOI17_wiring)C++17
Compilation error
0 ms0 KiB
#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; }

Compilation message (stderr)

wiring.cpp: In function 'long long int min_total_length(std::vector<int>, std::vector<int>)':
wiring.cpp:11:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int i=0; i<a.size(); i++)
                  ~^~~~~~~~~
wiring.cpp:13:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int i=0; i<b.size(); i++)
                  ~^~~~~~~~~
/tmp/ccMbiXyw.o: In function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/cckffd7R.o:wiring.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status