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"
#include <bits/stdc++.h>
using namespace std;
void Ramen(int n)
{
int mn=-1,mx=-1;
if(n&1) mn=mx=0;
for(int i=n&1;i<n;i+=2)
{
if(Compare(i,i+1)==-1)
{
if(mn==-1 || Compare(mn,i)==1) mn=i;
if(mx==-1 || Compare(mx,i+1)==-1) mx=i+1;
}
else
{
if(mn==-1 || Compare(mn,i+1)==1) mn=i+1;
if(mx==-1 || Compare(mx,i)==-1) mx=i;
}
}
Answer(mn,mx);
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |