이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
#include <utility>
using namespace std;
#define all(a) a.begin(), a.end()
#define rep(i,s,e) for(ll i=s;i<e;i++)
typedef long long ll;
typedef pair<ll, ll> pll;
typedef pair<int, int> pii;
const ll INF = 1e18;
typedef complex<double> cd;
const double pi = acos(-1);
const int mod = 1e9 + 7;
const ll mod1 = 1e9 + 9;
const ll mod2 = 998244353;
const ll mac = 31;
const int MAXN = 4e5 + 2;
typedef vector<int> vi;
typedef vector<vi> vvi;
vi x, y;
int n;
int init(int N, int X[], int Y[]) {
n = N;
rep(i, 0, n) x[i] = X[i], y[i] = Y[i];
int ans = 1, cef = 1;
rep(i, 0, n) {
cef *= x[i];
cef %= mod;
ans = max(ans, (cef * y[i])%mod);
}
return ans;
}
int updateX(int pos, int val) {
x[pos] = val;
int ans = 1, cef = 1;
rep(i, 0, n) {
cef *= x[i];
cef %= mod;
ans = max(ans, (cef * y[i]) % mod);
}
return ans;
}
int updateY(int pos, int val) {
y[pos] = val;
int ans = 1, cef = 1;
rep(i, 0, n) {
cef *= x[i];
cef %= mod;
ans = max(ans, (cef * y[i]) % mod);
}
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... |