Submission #1294434

#TimeUsernameProblemLanguageResultExecution timeMemory
1294434m_bezrutchkaCounting Mushrooms (IOI20_mushrooms)C++20
0 / 100
0 ms0 KiB
// 10 points, q = n - 1
#include "mushrooms.h"
#include <bits/stdc++.h>
using namespace std;

int count_mushrooms(int n) {
	int type[n];
	type[0] = 0;
	int ans = 1;
	for (int i = 1; i < n; i++) {
		type[i] = use_machine({0, i});
		if (type[i] == 0) ans++;
	}
	return ans;
}
#Verdict Execution timeMemoryGrader output
Fetching results...