# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
747313 | Desh03 | 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 "horses.h"
#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
vector<int> x, y;
int init(int n, vector<int> X, vector<int> Y) {
x = X, y = Y;
vector<int> p(n);
p[0] = x[0];
for (int i = 1; i < n; i++) p[i] = p[i - 1] * x[i];
int ans = 0;
for (int i = 0; i < n; i++) ans = max(ans, p[i] * y[i]);
return ans % mod;
}
int updateX(int pos, int val) {
}
int updateY(int pos, int val) {
}