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 lo = -1, hi = -1;
if (N & 1) lo = hi = N - 1;
for (int i = 0; i < N - 1; i += 2) {
if (~Compare(i, i + 1)) {
if (hi == -1 || ~Compare(i, hi)) hi = i;
if (lo == -1 || ~Compare(lo, i + 1)) lo = i + 1;
} else {
if (hi == -1 || ~Compare(i + 1, hi)) hi = i + 1;
if (lo == -1 || ~Compare(lo, i)) lo = i;
}
}
Answer(lo, hi);
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |