Submission #838566

#TimeUsernameProblemLanguageResultExecution timeMemory
838566ma_moutahidCounting Mushrooms (IOI20_mushrooms)C++17
10 / 100
147 ms384 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 result;
}
#Verdict Execution timeMemoryGrader output
Fetching results...