Submission #889080

#TimeUsernameProblemLanguageResultExecution timeMemory
889080svazArranging Shoes (IOI19_shoes)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; int n,zap; int64 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)

shoes.cpp:5:1: error: 'int64' does not name a type; did you mean 'int64_t'?
    5 | int64 count_swaps(int[]S){
      | ^~~~~
      | int64_t
shoes.cpp: In function 'int main()':
shoes.cpp:19:11: error: 'count_swaps' was not declared in this scope
   19 |     cout<<count_swaps(zapatos)<<"\n";
      |           ^~~~~~~~~~~