Submission #1185688

#TimeUsernameProblemLanguageResultExecution timeMemory
1185688islam_2010Counting Mushrooms (IOI20_mushrooms)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "mushrooms.h" using namespace std; int count_mushrooms(int n){ int l = 1, r = n-2; int x = use_machine({0, n-1}); int ans = 0; while (l < r){ int a = use_machine({0, l}); int b = used_machine(l, r); if(a==0){ if(b==0){ ans+=2; }if(b==1){ ans+=+; } }else { if(b==1){ ans++; } } }if(x==1){ ans++; }else { ans+=2; }return ans; }

Compilation message (stderr)

mushrooms.cpp: In function 'int count_mushrooms(int)':
mushrooms.cpp:12:17: error: 'used_machine' was not declared in this scope; did you mean 'use_machine'?
   12 |         int b = used_machine(l, r);
      |                 ^~~~~~~~~~~~
      |                 use_machine
mushrooms.cpp:17:23: error: expected primary-expression before ';' token
   17 |                 ans+=+;
      |                       ^