이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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,y) > 0) R = y;
}
}
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... |