Submission #416535

#TimeUsernameProblemLanguageResultExecution timeMemory
416535victoriadHorses (IOI15_horses)C++14
Compilation error
0 ms0 KiB
#include "horses.h" #include "vector" #include "cmath" #include "algorithm" #include "utility" using namespace std; using namespace std; long long int maxi(int N, int X[], int Y[],int nodo,int ca,long long di,long long int mayor){ if(nodo==N-1){ return ca*X[N-1]*Y[N-1]+di; } ca*=X[nodo]; long long int a=mayor; int j=ca; for(int i=0;i<ca;i++){ long long int b=maxi(N,X,Y,nodo+1,j,di+Y[nodo]*i,mayor); j--; if(b>a){ a=b; } } return max(a,mayor); } int init(int N, int X[], int Y[]) { long long int r=maxi(N,X,Y,0,1,0,0); int mod=1e+7; r%=(mod); int a=r; return a; }

Compilation message (stderr)

horses.cpp: In function 'int init(int, int*, int*)':
horses.cpp:28:8: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
   28 |  int a=r;
      |        ^
/usr/bin/ld: /tmp/ccsw9F0y.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