# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1125506 | jerzyk | Counting Mushrooms (IOI20_mushrooms) | C++20 | 4 ms | 448 KiB |
#include <bits/stdc++.h>
#include "mushrooms.h"
using namespace std;
#define pb push_back
#define st first
#define nd second
typedef long long ll;
typedef long double ld;
const ll I = 1000'000'000'000'000'000LL;
const int II = 2'000'000'000;
const ll M = 1000'000'007LL;
const int N = 1000'007;
vector<int> pos0, pos1;
int cur = 2, n, ans = 1;
void Q20()
{
vector<int> q;
q.pb(pos0[0]);
q.pb(cur); ++cur;
q.pb(pos0[1]);
q.pb(cur); ++cur;
int x = use_machine(q);
if(x % 2 == 0)
{
++ans; pos0.pb(q.back());
}else
{
pos1.pb(q.back());
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |