# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
416585 | victoriad | Horses (IOI15_horses) | C++14 | 32 ms | 4368 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 "vector"
#include "cmath"
#include "algorithm"
#include "utility"
using namespace std;
using namespace std;
int init(int N, int X[], int Y[]) {
int a=0;
int y=0;
int mod=1e9+7;
int r2=1;
for(int i=0;i<N;i++){
r2*=X[i];
r2%=(mod);
if(Y[i]>=a){
a=Y[i];
y=i;
}
}
int r=1;
for(int i=0;i<=y;i++){
r*=X[i];
r%=(mod);
}
r2*=Y[N-1];
r2%=mod;
r*=a;
r%=mod;
return max(r,r2);
}
int updateX(int pos, int val) {
return 0;
}
int updateY(int pos, int val) {
return 0;
}
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... |