제출 #234177

#제출 시각아이디문제언어결과실행 시간메모리
234177pere_gil말 (IOI15_horses)C++14
컴파일 에러
0 ms0 KiB
#include <iostream> #include "horses.h" using namespace std; int init(N, X, Y) { int big=0; int ja[N]; ja[0]=X[0]; for(int i=1;i<N;i++){ ja[i]=ja[i-1]*X[i]; } for(int i=0;i<N;i++) big=max(big, ja[i]*Y[i]); return big; }

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

horses.cpp:6:10: error: 'int init' redeclared as different kind of symbol
 int init(N, X, Y)
          ^
In file included from horses.cpp:2:0:
horses.h:4:5: note: previous declaration 'int init(int, int*, int*)'
 int init(int N, int X[], int Y[]);
     ^~~~
horses.cpp:6:10: error: 'N' was not declared in this scope
 int init(N, X, Y)
          ^
horses.cpp:6:13: error: 'X' was not declared in this scope
 int init(N, X, Y)
             ^
horses.cpp:6:16: error: 'Y' was not declared in this scope
 int init(N, X, Y)
                ^