Submission #908129

# Submission time Handle Problem Language Result Execution time Memory
908129 2024-01-16T08:21:36 Z allin27x Horses (IOI15_horses) C++17
Compilation error
0 ms 0 KB
#include <bits/stdc++.h>
using namespace std;
#define int long long
const int mod = 1e9+7;


signed init(signed n, vector<signed> x, vector<signed> y){
	int res = 0;
	int p = 1;
	for (int i=0; i<n; i++){
		p*=x[i]; 
		res = max(res, y[i]*p);
	}
	return res % mod;
}

signed updateX(signed pos, signed val);
signed updateY(signed pos, signed val);

Compilation message

horses.cpp: In function 'int init(int, std::vector<int>, std::vector<int>)':
horses.cpp:14:13: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
   14 |  return res % mod;
      |         ~~~~^~~~~
/usr/bin/ld: /tmp/ccFqzxPF.o: in function `main':
grader.c:(.text.startup+0xaa): undefined reference to `init(int, int*, int*)'
/usr/bin/ld: grader.c:(.text.startup+0x113): undefined reference to `updateX(int, int)'
/usr/bin/ld: grader.c:(.text.startup+0x16d): undefined reference to `updateY(int, int)'
collect2: error: ld returned 1 exit status