8
18
2013
1

【BZOJ1022】【SHOI2008】小约翰的游戏John【博弈论】

题解详见小礼物的大神的BLOG,弱渣就不说了。。。http://dzy493941464.is-programmer.com/posts/39629.html

 

program p1022;
	var
		t,n,i,ans,k,j,k1,k2:longint;
		bo:boolean;
	begin
		read(t);
		for k:=1 to t do begin
			read(n);
			ans:=0; k2:=0;
			for i:=1 to n do begin
				read(k1);
				if k1>1 then inc(k2);
				ans:=ans xor k1;
			end;
			if ((ans=0) and (k2>0)) or ((ans<>0) and (k2=0)) then writeln('Brother') else writeln('John');
		end;
	end.
Category: 博弈论 | Tags: | Read Count: 2693
Avatar_small
JSC Result Barisal B 说:
2022年8月27日 19:36

Bangladesh Education Board DPE has conducted the class 8th grade of Junior School Certificate Exam and Junior Dakhil Certificate Exam on 1st to 15th November 2022 at all centers in division wise under Ministry of Primary and Mass Education (MOPME), and the class 8th grade terminal examination tests are successfully conducted for all eligible JSC/JDC students for the academic year of 2022. JSC Result Barisal Board The Bangladesh government Minister of Secondary Education is going to announce the JSC Result 2022 in student wise for division students in education board wise, and the result documents will be submitted to the Prime Minister of the country after then the result with mark sheet will be announced to public to check the individual result.


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter

Host by is-Programmer.com | Power by Chito 1.3.3 beta | Theme: Aeros 2.0 by TheBuckmaker.com