Submission #1038050

#TimeUsernameProblemLanguageResultExecution timeMemory
1038050ArthuroWichHorses (IOI15_horses)C++17
17 / 100
1547 ms10580 KiB
#include "horses.h" #include<bits/stdc++.h> using namespace std; int n, x[500005], y[500005]; int query() { int ans = 0, co = 1; for (int i = 0; i < n; i++) { co *= x[i]; ans = max(ans, co*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]; y[i] = Y[i]; } return query(); } int updateX(int pos, int val) { x[pos] = val; return query(); } int updateY(int pos, int val) { y[pos] = val; return query(); }
#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...