Submission #390358

#TimeUsernameProblemLanguageResultExecution timeMemory
390358MilosMilutinovicCounting Mushrooms (IOI20_mushrooms)C++14
Compilation error
0 ms0 KiB
/**
 *    author:  milos
 *    created: 16.04.2021 00:04:13       
**/
#include <bits/stdc++.h>
#include "mushrooms.h"
 
using namespace std;

int count_mushrooms(int n) {
  int ans = 1;
  for (int i = 1; i < n; i += 2) {
    if (i == n - 1) {
      vector<int> qs = {0, i};
      ans += 1 - use_machine(qs); 
    } else {
      vector<int> qs = {i, 0, i + 1};
      int foo = use_machine(qs);
      ans += 2 - fool
    }
  }
  return ans;
}

Compilation message (stderr)

mushrooms.cpp: In function 'int count_mushrooms(int)':
mushrooms.cpp:19:18: error: 'fool' was not declared in this scope; did you mean 'foo'?
   19 |       ans += 2 - fool
      |                  ^~~~
      |                  foo
mushrooms.cpp:18:11: warning: unused variable 'foo' [-Wunused-variable]
   18 |       int foo = use_machine(qs);
      |           ^~~