Submission #889078

#TimeUsernameProblemLanguageResultExecution timeMemory
889078svazArranging Shoes (IOI19_shoes)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; int n,zap; int64_t count_swaps(int S[]){ if(n==1){ if(S[0]<S[1])return 0; return 1; } return n/2; } int main() { cin>>n; int zapatos[n]; for(int i=0;i<n;i++){ cin>>zapatos[i]; } cout<<count_swaps(zapatos)<<"\n"; }

Compilation message (stderr)

/usr/bin/ld: /tmp/ccBefwnM.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/cc5GgPWN.o:shoes.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/ccBefwnM.o: in function `main':
grader.cpp:(.text.startup+0x29d): undefined reference to `count_swaps(std::vector<int, std::allocator<int> >)'
collect2: error: ld returned 1 exit status