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"
#include <bits/stdc++.h>
#define xx first
#define yy second
using namespace std;
long long int typedef li;
const int mod=1000000007;
int n;
int x[12],y[12];
int sta()
{
int cur=1,ans=0;
for (int i=0;i<n;i++)
{
cur*=x[i];
if (cur*y[i]>ans) ans=cur*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];
for (int i=0;i<n;i++) y[i]=Y[i];
return sta();
}
int updateX(int pos, int val)
{
x[pos]=val;
return sta();
}
int updateY(int pos, int val)
{
y[pos]=val;
return sta();
}
# | 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... |