제출 #988709

#제출 시각아이디문제언어결과실행 시간메모리
988709bigo말 (IOI15_horses)C++14
0 / 100
12 ms8460 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...