# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
346215 | poom2904 | Counting Mushrooms (IOI20_mushrooms) | C++14 | 10 ms | 512 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;
int cnt_A = 1,cnt_B = 0;
vector<int> A = {0},B;
int i=1;
const int cri=100;//if cnt_A or cnt_B >cri, do func2
void func1()
{
while(max(cnt_A,cnt_B)<2)
{
vector<int> vec = {0,i};
if(use_machine(vec))
{
cnt_B++;
B.push_back(i);
}
else
{
cnt_A++;
A.push_back(i);
}
i++;
}
while((min(cnt_A,cnt_B)<2 || max(cnt_A,cnt_B)<3) && max(cnt_A,cnt_B)<cri)
{
bool is_swapped = false;
if(cnt_A<cnt_B)
{
swap(cnt_A,cnt_B);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |