제출 #645850

#제출 시각아이디문제언어결과실행 시간메모리
645850sandry24Arranging Shoes (IOI19_shoes)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; typedef pair<int, int> pi; #define pb push_back #define mp make_pair #define f first #define s second int count_swaps(vector<int>i s){ if(s[0] > 0) return 1; return 0; }

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

shoes.cpp:10:11: error: expected ',' or '...' before 'second'
   10 | #define s second
      |           ^~~~~~
shoes.cpp:12:30: note: in expansion of macro 's'
   12 | int count_swaps(vector<int>i s){
      |                              ^
shoes.cpp: In function 'int count_swaps(std::vector<int>)':
shoes.cpp:10:11: error: 'second' was not declared in this scope
   10 | #define s second
      |           ^~~~~~
shoes.cpp:13:8: note: in expansion of macro 's'
   13 |     if(s[0] > 0)
      |        ^