Submission #1359547

#TimeUsernameProblemLanguageResultExecution timeMemory
1359547FZ_LaabidiCounting Mushrooms (IOI20_mushrooms)C++20
25 / 100
18 ms380 KiB
#include "mushrooms.h"*
int count_mushrooms(int n) {

		int o = 1;
		for(int i=1; i<n-1; i+=2){
			o+=2;
			o-=use_machine({i, 0, i+1});
		}
		if(n%2==0)o+=(1-use_machine({0, n-1}));
		return o;

}

Compilation message (stderr)

mushrooms.cpp:1:23: warning: extra tokens at end of #include directive
    1 | #include "mushrooms.h"*
      |                       ^
#Verdict Execution timeMemoryGrader output
Fetching results...