제출 #909903

#제출 시각아이디문제언어결과실행 시간메모리
909903vjudge1Arranging Shoes (IOI19_shoes)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;

long long count_swaps(vector<int> S){
	if(vector[0]<0){
		cout << 0;
	}else{
		cout << 1;
	}
}

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

shoes.cpp: In function 'long long int count_swaps(std::vector<int>)':
shoes.cpp:5:11: error: expected unqualified-id before '[' token
    5 |  if(vector[0]<0){
      |           ^
shoes.cpp:10:1: warning: no return statement in function returning non-void [-Wreturn-type]
   10 | }
      | ^