Submission #838565

#TimeUsernameProblemLanguageResultExecution timeMemory
838565ma_moutahidCounting Mushrooms (IOI20_mushrooms)C++17
0 / 100
0 ms208 KiB
#include "mushrooms.h"
using namespace std;
#define vi vector<int>
int count_mushrooms(int n) {
	int type=1;
	int result=1;

	for(int i=0;i<n-1;i++){
		int count=use_machine(vi({i,i+1}));
		if(count){
			type=!type;
		}
		result+=type;
	}
	return type;
}
#Verdict Execution timeMemoryGrader output
Fetching results...