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<bits/stdc++.h>
int L = 0;
int R = 0;
void calc(int l,int r) {
if (r - l == 0) {
L = R = l;
return;
}
if (r - l == 1) {
L = l;
R = r;
if (Compare(L,R) < 0)
L = r,
R = l;
return;
}
int m = (l + r) / 2;
calc(l,m); ++m;
int ll = L;
int rr = R;
calc(m,r);
if (Compare(L,ll) < 0) L = ll;
if (Compare(R,rr) > 0) R = rr;
}
void Ramen(int n) {
calc(0,n - 1);
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... |