# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
430557 | REALITYNB | Horses (IOI15_horses) | C++14 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#include "horses.h"
#define ll long long
#define md ((ll)1e9+7)
using namespace std;
vector<ll> x,y ;
int init(int n , vector<int> fx, vector<int> fy){
for(int y: fx) x.push_back(y) ;
for(int x :fy) y.push_back(x);
ll horses = 1 ;
ll mx = 0 ;
for(ll i=0;i<n;i++){
horses*=x[i] ;
mx=max(mx,horses*y[i]) ;
}
mx%=md;
return (int)(mx);
}
int updateX(int h , int hh ){
return 0 ;
}
int updateX(int h , int hh){
return 0 ;
}