# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1004790 | magikarp23 | Horses (IOI15_horses) | C++17 | 0 ms | 0 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 <bits/stdc++.h>
#include "horses.h"
using namespace std;
int MAX_N = 500'000 + 1;
long long MOD = 1'000'000'000 + 7;
int memo[MAX_N];
int init(int N, int X[], int Y[]) {
long long max_profit = 0;
long long num_horses = 1;
for (int i=0; i<N; i++) {
num_horses *= X[i];
max_profit = max(max_profit, num_horses * Y[i]);
}
return max_profit;
}
int updateX(int pos, int val) {
return 0;
}
int updateY(int pos, int val) {
return 0;
}