Submission #304017

# Submission time Handle Problem Language Result Execution time Memory
304017 2020-09-21T00:35:38 Z Fdg Counting Mushrooms (IOI20_mushrooms) C++14
Compilation error
0 ms 0 KB
#include <iostream>
#include <vector>
#include <map>
#include <set>
#include <algorithm>

using namespace std;

int count_mushrooms(int n) {
  int ans = 1;
  for (int i = 1; i < n; i += 2) {
    vector<int> v;
    if (i + 1 < n) v = {i, 0, i + 1};
    else v = {i, 0};
    int ret = use_machine(v);
    ans += (v.size() - 1) - ret;
  }
  return ans;
}

Compilation message

mushrooms.cpp: In function 'int count_mushrooms(int)':
mushrooms.cpp:15:15: error: 'use_machine' was not declared in this scope
   15 |     int ret = use_machine(v);
      |               ^~~~~~~~~~~