Submission #1011218

#TimeUsernameProblemLanguageResultExecution timeMemory
1011218MardonbekhazratovHorses (IOI15_horses)C++17
17 / 100
20 ms8292 KiB
#include "horses.h" #include<algorithm> const int MOD=1e9+7; int init(int N, int X[], int Y[]) { long long ans=0,cur=1; for(int i=0;i<N;i++){ cur*=X[i]; ans=std::max(ans,cur*Y[i]); } return ans%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:11:12: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
   11 |  return ans%MOD;
      |         ~~~^~~~
horses.cpp: In function 'int updateX(int, int)':
horses.cpp:14:17: warning: unused parameter 'pos' [-Wunused-parameter]
   14 | int updateX(int pos, int val) {
      |             ~~~~^~~
horses.cpp:14:26: warning: unused parameter 'val' [-Wunused-parameter]
   14 | int updateX(int pos, int val) {
      |                      ~~~~^~~
horses.cpp: In function 'int updateY(int, int)':
horses.cpp:18:17: warning: unused parameter 'pos' [-Wunused-parameter]
   18 | int updateY(int pos, int val) {
      |             ~~~~^~~
horses.cpp:18:26: warning: unused parameter 'val' [-Wunused-parameter]
   18 | 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...