| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1296111 | eri16 | Counting Mushrooms (IOI20_mushrooms) | C++20 | 28 ms | 404 KiB |
#include "mushrooms.h"
#include <bits/stdc++.h>
using namespace std;
int count_mushrooms(int n){
vector <int> test;
int ans=1;
int cur=1;
while (cur<n){
if (cur==n-1){
vector <int> test;
test.push_back(cur);
test.push_back(0);
ans=ans+1-use_machine(test);
cur++;
}
else{
vector <int> test;
test.push_back(cur);
test.push_back(0);
test.push_back(cur+1);
ans=ans+2-use_machine(test);
cur+=2;
}
}
return ans;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
