Submission #132344

#TimeUsernameProblemLanguageResultExecution timeMemory
132344redaHorses (IOI15_horses)C++14
Compilation error
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; }

Compilation message (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[])
                    ^