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 = -1;
int R = -1;
for(int i = 0 ; i < n ; i += 2) {
int x = i;
int y = i + 1;
if (y >= n) y = x;
else {
if (Compare(x,y) < 0)
x = i + 1,
y = i;
}
if (L < 0) {
L = x;
R = y;
}
else {
if (Compare(L,x) < 0) L = x;
if (Compare(R,x) > 0) R = x;
}
}
Answer(R,L);
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |