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 "horses.h"
int n;
int _Y[1002];
int _X[1002];
int MOD = 1000000000+7;
int max(int a,int b) { if (a>b) return a; return b; }
int run(){
int t = 1;
int mx=0;
for(int i=0; i<n; i++){
t=((t%MOD)*(_X[i]%MOD)%MOD);
mx = max(mx, (t*(_Y[i]%MOD))%MOD);
}
return mx;
}
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 run();
}
int updateX(int pos, int val) {
_X[pos]=val;
return run();
}
int updateY(int pos, int val) {
_Y[pos]=val;
return run();
}
# | 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... |