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>
void Ramen(int N) {
int mi = 0, ma = 0;
if (N & 1) {
mi = ma = N - 1;
}
for (int i = 0; i + 1 < N; i += 2) {
int a = i, b = i + 1;
if (Compare(a, b) == 1) {
std::swap(a, b);
}
if (mi != a && Compare(mi, a) == 1) {
mi = a;
}
if (b != ma && Compare(b, ma) == 1) {
ma = b;
}
}
Answer(mi, ma);
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |