제출 #556075

#제출 시각아이디문제언어결과실행 시간메모리
556075Trisanu_DasArranging Shoes (IOI19_shoes)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; #define int long long int count_swaps(int[] S){ if(S[0] / abs(S[0]) != S[1] / abs(S[1])) return 0; else return 1; }

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

shoes.cpp:5:23: error: expected ',' or '...' before 'S'
    5 | int count_swaps(int[] S){
      |                       ^
shoes.cpp: In function 'long long int count_swaps(long long int*)':
shoes.cpp:6:6: error: 'S' was not declared in this scope
    6 |   if(S[0] / abs(S[0]) != S[1] / abs(S[1])) return 0;
      |      ^
shoes.cpp:8:1: warning: control reaches end of non-void function [-Wreturn-type]
    8 | }
      | ^