# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1079961 | 2024-08-29T05:04:21 Z | Jawad_Akbar_JJ | Counting Mushrooms (IOI20_mushrooms) | C++17 | 111 ms | 344 KB |
#include <iostream> #include <vector> #include "mushrooms.h" using namespace std; int count_mushrooms(int n){ int A = 1; vector<int> vec; for (int i=1;i<n;){ if (i + 1 < n and n > 4){ vec = {i, 0, i+1}; int ans = use_machine(vec); A += 2 - ans; i += 2; } else{ vec = {i, 0}; A += use_machine(vec) == 0; } } return A; }
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 111 ms | 344 KB | Too many queries. |
2 | Halted | 0 ms | 0 KB | - |