Submission #1319391

#TimeUsernameProblemLanguageResultExecution timeMemory
1319391SmuggingSpunCounting Mushrooms (IOI20_mushrooms)C++20
0 / 100
0 ms332 KiB
#include "mushrooms.h"
#include<bits/stdc++.h>
using namespace std;
int count_mushrooms(int n){
  n--;
  int ans = 0;
  while(n > 1){
    ans += 2 - use_machine({n, 0, n - 1});
    n -= 2;
  }
  if(n == 1){
    ans += 1 - use_machine({0, 1});
  }
  return ans;
}
#Verdict Execution timeMemoryGrader output
Fetching results...