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 l, r;
l = r = N%2?N - 1:-1;
for (int i = 1; i < N; i += 2) {
int x=i-1, y=i;
if (Compare(x, y) == 1) x ^= y ^= x ^= y;
if (l==-1||Compare(l,x) == 1) l = x;
if (r==-1||Compare(y,r) == 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... |