제출 #894175

#제출 시각아이디문제언어결과실행 시간메모리
894175ozner77Arranging Shoes (IOI19_shoes)C++17
컴파일 에러
0 ms0 KiB
#include <iostream>
#include <vector>
using namespace std;
int main()
{
  	int a,b;
  	vector<int> S;
    cin>>a;
    for(int i=0;i<a*2;i++){
        cin>>b;
        S.push_back(b);
    }
    if(S[0]<0){
      	int count_swaps=0;
        printf("%d",count_swaps);
    }else{
      	int count_swaps=1;
        printf("%d",count:swaps);
    }
}

컴파일 시 표준 에러 (stderr) 메시지

shoes.cpp: In function 'int main()':
shoes.cpp:18:26: error: found ':' in nested-name-specifier, expected '::'
   18 |         printf("%d",count:swaps);
      |                          ^
      |                          ::
shoes.cpp:18:21: error: 'count' has not been declared
   18 |         printf("%d",count:swaps);
      |                     ^~~~~
shoes.cpp:17:12: warning: unused variable 'count_swaps' [-Wunused-variable]
   17 |        int count_swaps=1;
      |            ^~~~~~~~~~~