Submission #1240956

#TimeUsernameProblemLanguageResultExecution timeMemory
1240956edga1말 (IOI15_horses)C++20
17 / 100
1593 ms8248 KiB
#include "horses.h" #include <bits/stdc++.h> using namespace std; const int MOD=1e9+7, N=5e5+5; int x[N], y[N],gn; int calculate(){ int m=0; for(int i=gn-1; i>=0; i--){ m=max(1ll*m*x[i]%MOD,1ll*x[i]*y[i]%MOD); } return m; } int init(int n, int X[], int Y[]){ gn=n; for(int i=0; i<n; i++){ x[i]=X[i]; y[i]=Y[i]; } return calculate(); } int updateX(int pos, int val) { x[pos]=val; return calculate(); } int updateY(int pos, int val) { y[pos]=val; return calculate(); }
#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...