Submission #641060

# Submission time Handle Problem Language Result Execution time Memory
641060 2022-09-15T21:34:47 Z Benmath Horses (IOI15_horses) C++14
Compilation error
0 ms 0 KB
#include <bits/stdc++.h>
#include<horses.h>
using namespace std;
int init(int N, int X[], int Y[]) {
	int pro=1;
	int maxi=0;
	for(int i=0;i<N;i++){
        pro=pro*X[i];
        int pro1=pro*Y[i];
        if(pro1>maxi){
            maxi=pro1;
        }
	}
	cout<<maxi;
}
/*
int main()
{
    cout << "Hello world!" << endl;
    return 0;
}
*/

Compilation message

horses.cpp: In function 'int init(int, int*, int*)':
horses.cpp:15:1: warning: no return statement in function returning non-void [-Wreturn-type]
   15 | }
      | ^
/usr/bin/ld: /tmp/cchBkPcb.o: in function `main':
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