# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
251580 | DavidDamian | Horses (IOI15_horses) | C++11 | 16 ms | 9984 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<bits/stdc++.h>
using namespace std;
#define mod 100000007
typedef long long ll;
int x[100005];
int y[100005];
int n;
int init(int N, int X[], int Y[]) {
n=N;
for(int i=0;i<n;i++){
x[i]=X[i];
y[i]=Y[i];
}
ll maximum=0;
ll product=1;
for(int i=0;i<n;i++){
product*=x[i];
maximum=max(maximum,y[i]*product);
}
return maximum;
}
int updateX(int pos, int val) {
x[pos]=val;
ll maximum=0;
ll product=1;
for(int i=0;i<n;i++){
product*=x[i];
maximum=max(maximum,y[i]*product);
}
return maximum;
}
int updateY(int pos, int val) {
y[pos]=val;
ll maximum=0;
ll product=1;
for(int i=0;i<n;i++){
product*=x[i];
maximum=max(maximum,y[i]*product);
}
return maximum;
}
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... |