Submission #793569

#TimeUsernameProblemLanguageResultExecution timeMemory
793569Jarif_RahmanHorses (IOI15_horses)C++17
17 / 100
22 ms8144 KiB
#include <bits/stdc++.h>
#define pb push_back
#define f first
#define sc second
using namespace std;
typedef long long int ll;
typedef string str;

const ll md = 1e9+7;

int init(int n, int X[], int Y[]){
    ll ans = 0, p = 1;
    for(int i = 0; i < n; i++){
        p*=X[i];
        ans = max(ans, p*Y[i]);
    }

    return ans%md;
}

int updateX(int i, int x){
    return 0;
}

int updateY(int i, int y){
    return 0;
}

Compilation message (stderr)

horses.cpp: In function 'int init(int, int*, int*)':
horses.cpp:18:15: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
   18 |     return ans%md;
      |            ~~~^~~
horses.cpp: In function 'int updateX(int, int)':
horses.cpp:21:17: warning: unused parameter 'i' [-Wunused-parameter]
   21 | int updateX(int i, int x){
      |             ~~~~^
horses.cpp:21:24: warning: unused parameter 'x' [-Wunused-parameter]
   21 | int updateX(int i, int x){
      |                    ~~~~^
horses.cpp: In function 'int updateY(int, int)':
horses.cpp:25:17: warning: unused parameter 'i' [-Wunused-parameter]
   25 | int updateY(int i, int y){
      |             ~~~~^
horses.cpp:25:24: warning: unused parameter 'y' [-Wunused-parameter]
   25 | int updateY(int i, int y){
      |                    ~~~~^
#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...