Submission #1011330

# Submission time Handle Problem Language Result Execution time Memory
1011330 2024-06-30T10:53:30 Z nisanduu Horses (IOI15_horses) C++14
Compilation error
0 ms 0 KB
/******************************************************************************

                              Online C++ Compiler.
               Code, Compile, Run and Debug C++ program online.
Write your code in this editor and press "Run" button to compile and execute it.

*******************************************************************************/

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll N = 1e5 + 10;
vector<int> a,b;
ll mod = 1e9 + 7;
int init(int n,vector<int> X,vector<int> Y){
    a=X;
    b=Y;
    N=n;
    ll ans = 0;
    ll cr = 1;
    for(int i=0;i<n;i++){
        cr = (cr*1LL*a[i])%mod;
        ans = max(ans,(cr*b[i]*1LL)%mod);
    }
    return ans;
}
int updateX(int pos,int val){
    a[pos]=val;
    return 0;
}
int updateY(int pos,int val){
    b[pos]=val;
    return 0;
}

Compilation message

horses.cpp: In function 'int init(int, std::vector<int>, std::vector<int>)':
horses.cpp:25:12: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
   25 |     return ans;
      |            ^~~
/usr/bin/ld: /tmp/ccagAlQe.o: in function `main':
grader.c:(.text.startup+0xaa): undefined reference to `init(int, int*, int*)'
collect2: error: ld returned 1 exit status