This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
size_t n;
int X[1 << 19], Y[1 << 19];
int compute()
{
int k = X[0], r = k*Y[0];
for(size_t i = 1; 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 time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |