Submission #416530

#TimeUsernameProblemLanguageResultExecution timeMemory
416530victoriadHorses (IOI15_horses)C++14
0 / 100
1568 ms6256 KiB
#include "horses.h" #include "vector" #include "cmath" #include "algorithm" #include "utility" using namespace std; int maxi(int N, int X[], int Y[],int nodo,int ca,int di,int mayor){ if(nodo==N-1){ return ca*X[N-1]*Y[N-1]+di; } ca*=X[nodo]; int a=mayor; int j=ca; for(int i=0;i<ca;i++){ 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[]) { int r=maxi(N,X,Y,0,1,0,0); return r; } int updateX(int pos, int val) { return 0; } int updateY(int pos, int val) { return 0; }

Compilation message (stderr)

horses.cpp: In function 'int updateX(int, int)':
horses.cpp:28:17: warning: unused parameter 'pos' [-Wunused-parameter]
   28 | int updateX(int pos, int val) {
      |             ~~~~^~~
horses.cpp:28:26: warning: unused parameter 'val' [-Wunused-parameter]
   28 | int updateX(int pos, int val) {
      |                      ~~~~^~~
horses.cpp: In function 'int updateY(int, int)':
horses.cpp:32:17: warning: unused parameter 'pos' [-Wunused-parameter]
   32 | int updateY(int pos, int val) {
      |             ~~~~^~~
horses.cpp:32:26: warning: unused parameter 'val' [-Wunused-parameter]
   32 | int updateY(int pos, int val) {
      |                      ~~~~^~~
#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...