제출 #1156242

#제출 시각아이디문제언어결과실행 시간메모리
1156242aarb_.tomatexdHorses (IOI15_horses)C++20
17 / 100
1595 ms8276 KiB
#include "horses.h" #include<bits/stdc++.h> using namespace std; #define ll long long int n, x[500005], y[500005]; int query() { int ans = 0, co = 1; for (int i = 0; i < n; i++) { co *= x[i]; ans = max(ans, co*y[i]); } return ans; } int init(int N, int X[], int Y[]) { n = N; for (int i = 0; i < n; i++) { x[i] = X[i]; y[i] = Y[i]; } return query(); } int updateX(int pos, int val) { x[pos] = val; return query(); } int updateY(int pos, int val) { y[pos] = val; return query(); }
#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...