Submission #391151

#TimeUsernameProblemLanguageResultExecution timeMemory
391151Andyvanh1Wiring (IOI17_wiring)C++14
Compilation error
0 ms0 KiB
using namespace std; // 17.4.1.2 Headers // C #ifndef _GLIBCXX_NO_ASSERT #include <cassert> #endif #include <cctype> #include <cerrno> #include <cfloat> #include <ciso646> #include <climits> #include <clocale> #include <cmath> #include <csetjmp> #include <csignal> #include <cstdarg> #include <cstddef> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #if __cplusplus >= 201103L #include <ccomplex> #include <cfenv> #include <cinttypes> #include <cstdbool> #include <cstdint> #include <ctgmath> #include <cwchar> #include <cwctype> #endif // C++ #include <algorithm> #include <bitset> #include <complex> #include <deque> #include <exception> #include <fstream> #include <functional> #include <iomanip> #include <ios> #include <iosfwd> #include <iostream> #include <istream> #include <iterator> #include <limits> #include <list> #include <locale> #include <map> #include <memory> #include <new> #include <numeric> #include <ostream> #include <queue> #include <set> #include <sstream> #include <stack> #include <stdexcept> #include <streambuf> #include <string> #include <typeinfo> #include <utility> #include <valarray> #include <vector> #if __cplusplus >= 201103L #include <array> #include <atomic> #include <chrono> #include <condition_variable> #include <forward_list> #include <future> #include <initializer_list> #include <mutex> #include <random> #include <ratio> #include <regex> #include <scoped_allocator> #include <system_error> #include <thread> #include <tuple> #include <typeindex> #include <type_traits> #include <unordered_map> #include <unordered_set> #endif #define vt vector typedef long long ll; typedef vt<int> vi; ll min_total_length(vi r, vi b){ int n = r.size(); int m = b.size(); ll ans = 0; ans+=max(n,m)*(b[0]-r[n-1]); for(int i = 0; i < n; i++){ ans+=r[n-1]-r[i]; } for(int i = 0; i < m; i++){ ans+=b[i]-b[0]; } return ans; } int main() { int n, m; cin>>n>>m; vi arr1(n); vi arr2(m); for(int i = 0; i < n; i++){ cin>>arr1[i]; } for(int i = 0; i < m; i++){ cin>>arr2[i]; } cout<<min_total_length(arr1,arr2); return 0; }

Compilation message (stderr)

/tmp/ccAR2ACp.o: In function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/ccDGMrH7.o:wiring.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status