# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
629226 | Gullesnuffs | Rarest Insects (IOI22_insects) | C++17 | 83 ms | 1744 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 "insects.h"
#include <bits/stdc++.h>
using namespace std;
#define rep(i, a, b) for(int i = a; i < (b); ++i)
#define all(x) begin(x), end(x)
#define sz(x) (int)(x).size()
typedef long long ll;
typedef pair<int, int> pii;
vector<deque<int>> at_h;
vector<int> min_num_at_or_below_h;
vector<int> max_num_at_or_below_h;
int num_inside = 0;
vector<int> v;
int n;
int H = 1;
int h_lo;
int h_hi;
int target_h;
int num_move_inside = 0;
int num_queries = 0;
void debug() {
cerr << endl << endl;
rep(h,1,sz(at_h)) {
if (!at_h[h].empty() || max_num_at_or_below_h[h]) {
cerr << "h = " << h << ". Num at or below = " << min_num_at_or_below_h[h] << " - " << max_num_at_or_below_h[h]+num_inside << ". Insects = [";
for (int x : at_h[h]) {
cerr << x << ", ";
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |