#include "horses.h"
#include <bits/stdc++.h>
using namespace std;
typedef __int128 ll;
typedef tuple <ll,ll,ll> plll;
typedef vector <plll> vplll;
typedef pair <ll,ll> pll;
typedef vector <ll> vll;
typedef vector <pll> vpll;
typedef vector <vector <pll>> vvpll;
typedef vector <vector <ll>> vvll;
typedef vector <bool> vb;
typedef vector <vector <bool>> vvb;
#define loop(i, s, e) for (ll i = (s); i < (e); ++i)
#define loopr(i, e, s) for (ll i = (e)-1; i >= (s); --i)
#define all(a) a.begin(), a.end()
const ll inf = 1e9 + 7;
vll x,y;
ll n;
int init(int N, int X[], int Y[]) {
n = N;
x.resize(n), y.resize(n);
loop(i,0,n) {
x[i] = X[i];
y[i] = Y[i];
}
ll hor = 1, ans = 0;
loop(i,0,n) {
hor=(x[i]*hor)%inf;
ans = max(ans,(y[i]*hor)%inf);
}
return ans;
}
int updateX(int pos, int val) {
x[pos] = val;
ll hor = 1, ans = 0;
loop(i,0,n) {
hor=(hor);
ans = max(ans,(y[i]*hor));
ans%=inf;
}
return ans;
}
int updateY(int pos, int val) {
y[pos] = val;
ll hor = 1, ans = 0;
loop(i,0,n) {
hor=(hor);
ans = max(ans,(y[i]*hor));
ans%=inf;
}
return ans;
}
# | 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... |