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>
#define ll long long
using namespace std;
const int MAXN = 5e5+1;
const int MOD = 1e9+7;
int x[MAXN], y[MAXN], n;
ll init(int N, int X[], int Y[]){
ll cur = 1ll, ans = 1ll; n = N;
for(int i = 0;i<N;++i){
x[i] = X[i];
y[i] = Y[i];
cur = cur*X[i]%MOD;
ans = max(ans,cur*Y[i]%MOD);
}
return ans;
}
ll updateX(int pos, int val){
x[pos] = val;
ll cur = 1ll, ans = 1ll;
for(int i = 0;i<n;++i){
cur = cur*x[i]%MOD;
ans = max(ans,cur*y[i]%MOD);
}
return ans;
}
ll updateY(int pos, int val){
y[pos] = val;
ll cur = 1ll, ans = 1ll;
for(int i = 0;i<n;++i){
cur = cur*x[i]%MOD;
ans = max(ans,cur*y[i]%MOD);
}
return ans;
}
# | 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... |