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 <vector>
void Ramen(int N) {
int l=-1,r=-1;
if (N % 2) l = r = N-1;
for (int i=0;i<N;i+=2){
int x = i, y = i + 1, t;
if (Compare(i,i+1) == 1) t = x, x = y, y = t;
if (l == -1 || Compare(x,l) == -1) l = x;
if (r == -1 || Compare(r,y) == -1) r = y;
}
Answer(l,r);
}
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... |