# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
305938 | Jarif_Rahman | Counting Mushrooms (IOI20_mushrooms) | C++17 | 267 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>
#define pb push_back
#define f first
#define sc second
#define um use_machine
using namespace std;
typedef long long int ll;
typedef string str;
int n;
int count_mushrooms(int nn){
n = nn;
int ans = 1;
bool cur = 1;
for(int i = 1; i < n; i++){
if(um({i-1, i}) > 0) cur = !cur;
if(cur) ans++;
}
return ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |