Submission #1362868

#TimeUsernameProblemLanguageResultExecution timeMemory
1362868cowkimCounting Mushrooms (IOI20_mushrooms)C++20
25 / 100
19 ms400 KiB
#include "mushrooms.h"

int count_mushrooms(int n) {
	int count = 1;
	for(int i = 1; i< n; i+= 2){
		if(i+1 == n) count += 1 - use_machine({i,0});
		else count += 2 - use_machine({i+1,0,i});
	}
	return count;
}
#Result Execution timeMemoryGrader output
Fetching results...