Submission #411614

#TimeUsernameProblemLanguageResultExecution timeMemory
411614JUANDI321Counting Mushrooms (IOI20_mushrooms)C++17
Compilation error
0 ms0 KiB
#include <iostream> #include <vector> using namespace std; vector<int> x; int count_mushrooms(int n) { long long A = 1, B = 0; x.push_back(0); for(int i = 1; i<n; i++) { x.push_back(i); int p = use_machine(x); if(p==0)A++; x.pop_back(); } return A; }

Compilation message (stderr)

mushrooms.cpp: In function 'int count_mushrooms(int)':
mushrooms.cpp:13:17: error: 'use_machine' was not declared in this scope
   13 |         int p = use_machine(x);
      |                 ^~~~~~~~~~~
mushrooms.cpp:8:22: warning: unused variable 'B' [-Wunused-variable]
    8 |     long long A = 1, B = 0;
      |                      ^