Submission #1189592

#TimeUsernameProblemLanguageResultExecution timeMemory
1189592pensiveHorses (IOI15_horses)C++20
0 / 100
1595 ms12300 KiB
#include <iostream> #include <algorithm> #include <cmath> using namespace std; #define REP(a,i,n) for (ll i=a;i<n;i++) #define ll long long #define ssize 500'000 const long double MOD = 1e9+7; int N; double X[ssize], Y[ssize]; ll solve() { //ll mx=0, hNum=1; long double emx = -1, hiNum=0; REP(0,i,N) { hiNum += log10(X[i]); emx = max(emx, hiNum+log10(Y[i])); } return fmod(pow(10, emx),MOD); } 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...