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 "ramen.h"
void Ramen(int n){
int i,m=0,M=1;
if(Compare(0,1)>0)M=0,m=1;
for(i=2;i+1<n;i+=2){
if(Compare(i,i+1)>0){
M=(Compare(i,M)>0?i:M);
m=(Compare(i+1,m)<0?i+1:m);
}
else{
M=(Compare(i+1,M)>0?i+1:M);
m=(Compare(i,m)<0?i:m);
}
}
if(n%2){
M=(Compare(n-1,M)>0?n-1:M);
m=(Compare(n-1,m)<0?n-1:m);
}
Answer(m,M);
}
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... |