Submission #568549

#TimeUsernameProblemLanguageResultExecution timeMemory
568549n0sk1llHorses (IOI15_horses)C++14
17 / 100
16 ms10488 KiB
#include "horses.h" #include <bits/stdc++.h> #define xx first #define yy second using namespace std; long long int typedef li; const int mod=1000000007; int n; int x[12],y[12]; int sta() { int cur=1,ans=0; for (int i=0;i<n;i++) { cur*=x[i]; if (cur*y[i]>ans) ans=cur*y[i]; } return ans; } int init(int N, int X[], int Y[]) { n=N; for (int i=0;i<n;i++) x[i]=X[i]; for (int i=0;i<n;i++) y[i]=Y[i]; return sta(); } int updateX(int pos, int val) { x[pos]=val; return sta(); } int updateY(int pos, int val) { y[pos]=val; return sta(); }
#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...