# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
646138 | Matteo_Verz | medians (balkan11_medians) | C++17 | 25 ms | 2888 KiB |
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>
#ifdef BLAT
#include "debug/debug.hpp"
#else
#define debug(x...)
#endif
using namespace std;
void nextValue(int &last, int coef, const vector <bool> &visited) {
while (visited[last] == true)
last += coef;
}
void insertValue(int value, int &l, int &r, vector <int> &v, vector <bool> &visited) {
v.push_back(value);
visited[value] = true;
nextValue(l, 1, visited);
nextValue(r, -1, visited);
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int n;
cin >> n;
vector <int> a, b(n);
vector <bool> visited(2 * n);
cin >> b[0];
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |