# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
432030 | Ozy | Counting Mushrooms (IOI20_mushrooms) | C++17 | 11 ms | 328 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;
#define lli int
#define rep(i,a,b) for(int i = (a); i <= (b); i++)
#define repa(i,a,b) for(int i = (a); i >= (b); i--)
#define debug(a) cout << #a << " = " << a << endl
#define debugsl(a) cout << #a << " = " << a << ", "
lli as,bs,pos,p,tam,y,res;
vector<lli> A,B,arr,ult;
lli busca(lli raiz, lli tipo) {
vector<lli> llamada;
llamada = vector<lli> (4, 0);
if (tipo == 1) llamada[0] = A[0], llamada[2] = A[1];
else llamada[0] = B[0], llamada[2] = B[1];
lli x,pos = 3;
while (as < raiz && bs < raiz) {
llamada[1] = pos++;
llamada[3] = pos++;
x = use_machine(llamada);
if (tipo == 1) {
if (x == 0) {as += 2; A.push_back(pos-2); A.push_back(pos-1);}
else if (x == 1) {as++; A.push_back(pos-2); bs++; B.push_back(pos-1);}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |