제출 #889080

#제출 시각아이디문제언어결과실행 시간메모리
889080svazArranging Shoes (IOI19_shoes)C++14
컴파일 에러
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"; }

컴파일 시 표준 에러 (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";
      |           ^~~~~~~~~~~