Submission #135391

#TimeUsernameProblemLanguageResultExecution timeMemory
135391StevenHHorses (IOI15_horses)C++14
Compilation error
0 ms0 KiB
#include "horses.h"

long long s[10000];
long long mx=-1;
int init(int N, int X[], int Y[]) {
	s[0]=X[0];
	for(int i=1;i<N;i++)
	{
		s[i]=s[i-1]*X[i];
		if(s[i]*Y[i]>mx)mx=s[i]*Y[i];
	}

	return mx % 1e9+7;
}

int updateX(int pos, int val) {	
	return 0;
}

int updateY(int pos, int val) {
	return 0;
}

Compilation message (stderr)

horses.cpp: In function 'int init(int, int*, int*)':
horses.cpp:13:12: error: invalid operands of types 'long long int' and 'double' to binary 'operator%'
  return mx % 1e9+7;
         ~~~^~~~~
horses.cpp: In function 'int updateX(int, int)':
horses.cpp:16:17: warning: unused parameter 'pos' [-Wunused-parameter]
 int updateX(int pos, int val) { 
                 ^~~
horses.cpp:16:26: warning: unused parameter 'val' [-Wunused-parameter]
 int updateX(int pos, int val) { 
                          ^~~
horses.cpp: In function 'int updateY(int, int)':
horses.cpp:20:17: warning: unused parameter 'pos' [-Wunused-parameter]
 int updateY(int pos, int val) {
                 ^~~
horses.cpp:20:26: warning: unused parameter 'val' [-Wunused-parameter]
 int updateY(int pos, int val) {
                          ^~~