# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
303286 | model_code | Counting Mushrooms (IOI20_mushrooms) | C++17 | 15 ms | 384 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.
/*
* Solution with two mixed phases of dynamic size
* By "mixed" we mean that new types are also detected in the second phase.
* By "dynamic" we mean that #queries in the first phase is computed dynamically based on the current results.
*
* Author: Kian Mirjalali
*/
#include "mushrooms.h"
#include <cmath>
#include <algorithm>
#include <functional>
using namespace std;
#define allOf(c) ((c).begin()), ((c).end())
template<class C>
inline int largest_element_index(const vector<C>& v) {
return max_element(allOf(v), [](const C& c1, const C& c2) {return c1.size()<c2.size();}) - v.begin();
}
/**
* @returns ceil(a/b) for integers a, b
*/
template<class T>
inline T ceildiv(T a, T b) {
return (a+b-1)/b;
}
/**
* Finds minimum input of a function in range [begin, end).
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |