# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
68952 | theknife2001 | Horses (IOI15_horses) | C++17 | 21 ms | 8556 KiB |
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 "grader.cpp"
#include <bits/stdc++.h>
using namespace std;
const int N=1e3+55;
long long x[N];
long long y[N];
int m=1e9+7;
int init(int N, int X[], int Y[])
{
long long s=1;
long long ret=0;
for(int i=0;i<N;i++)
{
x[i]=X[i];
y[i]=Y[i];
}
for(int i=0;i<N;i++)
{
s*=x[i];
ret=max(s*y[i],ret);
}
return (ret%m);
}
int updateX(int pos, int val) {
long long s=1;
long long ret=0;
x[pos]=val;
for(int i=0;i<N;i++)
{
s*=x[i];
ret=max(s*y[i],ret);
}
return (ret%m);
}
int updateY(int pos, int val) {
long long s=1;
long long ret=0;
y[pos]=val;
for(int i=0;i<N;i++)
{
s*=x[i];
ret=max((s*y[i]),ret);
}
return (ret%m);
}
Compilation message (stderr)
# | 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... |