Submission #234177

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

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