# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1064834 | 2024-08-18T18:21:05 Z | XJP12 | Counting Mushrooms (IOI20_mushrooms) | C++14 | 1 ms | 344 KB |
#include <bits/stdc++.h> #include "mushrooms.h" using namespace std; typedef vector<int> vi; int count_mushrooms(int n) { vi m; int c1=1; bool ban=true; for(int i=0; i<n; i++){ m.clear(); m.push_back(i); m.push_back(i+1); int x =use_machine(m); if(ban){ if(x==1){ban=false;}else{c1++;} }else{ if(x==1){ban=true; c1++;} } } return c1; }
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 344 KB | Invalid value 3 in the query array. |
2 | Halted | 0 ms | 0 KB | - |