# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
367658 | rocks03 | Counting Mushrooms (IOI20_mushrooms) | C++14 | 11 ms | 492 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.
//#pragma GCC target("avx2")
//#pragma GCC optimization("O3")
//#pragma GCC optimization("unroll-loops")
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pii pair<int, int>
#define pll pair<ll, ll>
#define ff first
#define ss second
#define pb push_back
#define SZ(x) ((int)(x).size())
#define all(x) x.begin(), x.end()
#define rep(i, a, b) for(int i = (a); i < (b); i++)
#define per(i, a, b) for(int i = (a); i >= (b); i--)
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int use_machine(vector<int>);
int count_mushrooms(int N){
vector<int> a = {0}, b;
int ind = 1;
vector<int> ask = {0, 1};
int ans = use_machine(ask);
++ind;
if(ans == 0) a.pb(1);
else b.pb(1);
if(N == 2) return SZ(a);
if(SZ(a) < 2){
ask = {0, 2};
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |