제출 #132344

#제출 시각아이디문제언어결과실행 시간메모리
132344reda말 (IOI15_horses)C++14
컴파일 에러
0 ms0 KiB
#include<bits/stdc++.h> using namespace std ; #define MOD 1000000007 # include "horses.h" long long init(int n, int x[], int y[]) { long long h=1,ans=0; for(int i=0;i<N;i++) { h*=x[i]; h%=MOD; ans=max((h*y[i])%MOD,ans); } return ans%MOD; }

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

horses.cpp: In function 'long long int init(int, int*, int*)':
horses.cpp:5:11: error: ambiguating new declaration of 'long long int init(int, int*, int*)'
 long long init(int n, int x[], int y[])
           ^~~~
In file included from horses.cpp:4:0:
horses.h:4:5: note: old declaration 'int init(int, int*, int*)'
 int init(int N, int X[], int Y[]);
     ^~~~
horses.cpp:8:16: error: 'N' was not declared in this scope
  for(int i=0;i<N;i++)
                ^
horses.cpp:5:20: warning: unused parameter 'n' [-Wunused-parameter]
 long long init(int n, int x[], int y[])
                    ^