Submission #411615

#TimeUsernameProblemLanguageResultExecution timeMemory
411615JUANDI321Counting Mushrooms (IOI20_mushrooms)C++17
10 / 100
280 ms320 KiB
#include "mushrooms.h" #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:9:22: warning: unused variable 'B' [-Wunused-variable]
    9 |     long long A = 1, B = 0;
      |                      ^
#Verdict Execution timeMemoryGrader output
Fetching results...