Submission #251555

#TimeUsernameProblemLanguageResultExecution timeMemory
251555DavidDamianHorses (IOI15_horses)C++11
17 / 100
16 ms9984 KiB
#include "horses.h" #include<bits/stdc++.h> using namespace std; typedef long long ll; int n; int x[100005]; int y[100005]; ll horses[100005]; int init(int N, int X[], int Y[]) { n=N; for(int i=0;i<N;i++){ x[i]=X[i]; y[i]=Y[i]; } horses[0]=x[0]; ll maximum=horses[0]*y[0]; for(int i=1;i<n;i++){ horses[i]=horses[i-1]*x[i]; maximum=max(maximum,horses[i]*y[i]); } return maximum; } 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:21:9: warning: conversion to 'int' from 'll {aka long long int}' may alter its value [-Wconversion]
  return maximum;
         ^~~~~~~
horses.cpp: In function 'int updateX(int, int)':
horses.cpp:24:17: warning: unused parameter 'pos' [-Wunused-parameter]
 int updateX(int pos, int val) {
                 ^~~
horses.cpp:24:26: warning: unused parameter 'val' [-Wunused-parameter]
 int updateX(int pos, int val) {
                          ^~~
horses.cpp: In function 'int updateY(int, int)':
horses.cpp:28:17: warning: unused parameter 'pos' [-Wunused-parameter]
 int updateY(int pos, int val) {
                 ^~~
horses.cpp:28:26: warning: unused parameter 'val' [-Wunused-parameter]
 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...