Submission #1055579

#TimeUsernameProblemLanguageResultExecution timeMemory
1055579TrentCounting Mushrooms (IOI20_mushrooms)C++17
10 / 100
113 ms508 KiB
#include "mushrooms.h"
#include "bits/stdc++.h"
using namespace std;
#define forR(i, x) for(int i = 0; i < (x); ++i)
#define REP(i, a, b) for(int i = (a); i < (b); ++i)
#define all(x) x.begin(), x.end()
typedef long long ll;
typedef vector<ll> vll;

int count_mushrooms(int n) {
	int tot = 1;
	REP(i, 1, n) {
		vector<int> thing = {0, i};
		int res = use_machine(thing);
		if(res == 0) ++tot;
	}
	return tot;
}
#Verdict Execution timeMemoryGrader output
Fetching results...