Submission #1188878

#TimeUsernameProblemLanguageResultExecution timeMemory
1188878pensiveHorses (IOI15_horses)C++20
17 / 100
1593 ms12240 KiB
#include <iostream> #include <algorithm> using namespace std; #define REP(a,i,n) for (ll i=a;i<n;i++) #define ll long long #define ssize 500'000 const ll MOD = 10e9+7; int N; ll X[ssize], Y[ssize]; ll solve() { ll mx=0, hNum=1; REP(0,i,N) { hNum = (hNum * X[i])%MOD; mx = max(mx, hNum*Y[i])%MOD; } return mx; } ll init(int n, int x[], int y[]) { N = n; REP(0,i,n) { X[i] = x[i]; Y[i] = y[i]; } return solve(); } ll updateX(int pos, int val) { X[pos] = val; return solve(); } ll updateY(int pos, int val) { Y[pos] = val; return solve(); }
#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...