Submission #1185690

#TimeUsernameProblemLanguageResultExecution timeMemory
1185690islam_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 = use_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:17:23: error: expected primary-expression before ';' token
   17 |                 ans+=+;
      |                       ^