# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
315441 | nonthaphat | Counting Mushrooms (IOI20_mushrooms) | C++14 | 13 ms | 544 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 "mushrooms.h"
#include <bits/stdc++.h>
using namespace std;
int seed = time(0);
bool swapped = false;
int i = 1;
int just_count_A = 0;
int just_count_B = 0;
vector<int> A = { 0 };
vector<int> B = { };
vector<int> idx;
int calc_pivots_size(int n) {
return 1 + 3*sqrt(n)/4;
}
void make_swap() {
swapped = not swapped;
swap(just_count_A, just_count_B);
swap(A, B);
}
bool decide_swap() {
if (A.size() < B.size()) {
make_swap();
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |