Submission #132345

#TimeUsernameProblemLanguageResultExecution timeMemory
132345redaHorses (IOI15_horses)C++14
Compilation error
0 ms0 KiB
#include<bits/stdc++.h>
using namespace std ;
#define  MOD 1000000007
# include "horses.h"
int 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 'int init(int, int*, int*)':
horses.cpp:8:16: error: 'N' was not declared in this scope
  for(int i=0;i<N;i++)
                ^
horses.cpp:14:15: warning: conversion to 'int' from 'long long int' may alter its value [-Wconversion]
     return ans%MOD;
               ^
horses.cpp:5:14: warning: unused parameter 'n' [-Wunused-parameter]
 int init(int n, int x[], int y[])
              ^