# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
307265 | vipghn2003 | Horses (IOI15_horses) | C++14 | 28 ms | 4472 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>
using namespace std;
long long init(int N,int X[],int Y[])
{
long long res;
for(int i=0;i<N;i++)
{
long long cur=1;
int id=-1;
for(int j=i+1;j<N;j++)
{
cur*=X[j];
if(cur*Y[j]>=Y[i])
{
id=j;
break;
}
}
if(id==-1)
{
res=Y[i];
for(int j=0;j<=i;j++) res*=X[j];
return res;
}
else i=id-1;
}
}
long long updateX(int pos,int val)
{
return 0;
}
long long updateY(int pos,int val)
{
return 0;
}
/*
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int N;
cin>>N;
int X[N],Y[N];
for(int i=0;i<N;i++) cin>>X[i];
for(int i=0;i<N;i++) cin>>Y[i];
cout<<init(N,X,Y);
}*/
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |