Submission #238036

#TimeUsernameProblemLanguageResultExecution timeMemory
238036KubinHorses (IOI15_horses)C++11
17 / 100
1590 ms8416 KiB
#include <bits/stdc++.h> using namespace std; size_t n; int X[1 << 19], Y[1 << 19]; int compute() { int k = 1, r = 0; for(size_t i = 0; i < n; i++) k *= X[i], r = max(r, k*Y[i]); return r; } int init(int _n, int x[], int y[]) { n = _n; copy(x, x + n, X); copy(y, y + n, Y); return compute(); } int updateX(int pos, int val) { X[pos] = val; return compute(); } int updateY(int pos, int val) { Y[pos] = val; return compute(); }
#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...