제출 #1135431

#제출 시각아이디문제언어결과실행 시간메모리
1135431gyg말 (IOI15_horses)C++20
17 / 100
18 ms12332 KiB
// 0 indexed btw #include "horses.h" #include <bits/stdc++.h> using namespace std; #define lint long long #define arr array const int N = 5e5 + 5; const lint MD = 1e9 + 7; int n; arr<lint, N> grw, prc; lint md(lint x) { return (x + MD) % MD; } int init(int _n, int _grw[], int _prc[]) { n = _n; for (int i = 1; i <= n; i++) grw[i] = _grw[i - 1], prc[i] = _prc[i - 1]; lint cr = 1, ans = 0; for (int i = 1; i <= n; i++) { cr = cr * grw[i]; ans = max(ans, cr * prc[i]); } ans = md(ans); return ans; } int updateX(int pos, int val) { return 0; } int updateY(int pos, int val) { return 0; }
#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...