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<bits/stdc++.h>
using namespace std;
#include "ramen.h"
#define all(x) (x).begin(), (x).end()
#define sz(x) ( (int)(x).size() )
using LL = long long;
mt19937 rng( (uint32_t)chrono::steady_clock::now().time_since_epoch().count() );
void Ramen(int N) {
vector<int> small, big;
for (int i = 0; i < N; i += 2) {
if (i + 1 < N) {
if (~Compare(i, i + 1) ) {
big.emplace_back(i + 1);
small.emplace_back(i);
}
else {
big.emplace_back(i);
small.emplace_back(i + 1);
}
}
else {
small.emplace_back(i);
big.emplace_back(i);
}
}
int x = big[0];
for (int i = 1; i < sz(big); ++i) if (~Compare(x, big[i]) ) x = big[i];
int y = small[0];
for (int i = 1; i < sz(small); ++i) if (~Compare(small[i], y) ) y = small[i];
Answer(x, y);
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |