Submission #754897

#TimeUsernameProblemLanguageResultExecution timeMemory
754897APROHACKHorses (IOI15_horses)C++14
17 / 100
26 ms12032 KiB
	#include <bits/stdc++.h>
#include "horses.h"
#define ll long long
#define pb push_back
const int mod = 1e9+7;
using namespace std;
int init(int N, int X[], int Y[]) {
	ll acum[N];
	acum[0] = X[0];
	ll maxV = 0;
	maxV = Y[0] * acum[0];
	for(int i = 1 ; i < N ; i ++){
		acum[i] = acum[i-1] * X[i];
		maxV = max(maxV, Y[i] * acum[i]);
	}
	return maxV%mod;
}

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:16:13: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
   16 |  return maxV%mod;
      |         ~~~~^~~~
horses.cpp: In function 'int updateX(int, int)':
horses.cpp:19:17: warning: unused parameter 'pos' [-Wunused-parameter]
   19 | int updateX(int pos, int val) {
      |             ~~~~^~~
horses.cpp:19:26: warning: unused parameter 'val' [-Wunused-parameter]
   19 | int updateX(int pos, int val) {
      |                      ~~~~^~~
horses.cpp: In function 'int updateY(int, int)':
horses.cpp:23:17: warning: unused parameter 'pos' [-Wunused-parameter]
   23 | int updateY(int pos, int val) {
      |             ~~~~^~~
horses.cpp:23:26: warning: unused parameter 'val' [-Wunused-parameter]
   23 | int updateY(int pos, int val) {
      |                      ~~~~^~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...