文件名称:zerone
介绍说明--下载内容来自于网络,使用问题请自行百度
【题目描述】
Adam 和Eve 被赶出伊甸园后,盖起了四面高墙。高墙上写着n 行01 串。两人无事可做,于是
开始就这些01 串做如下博弈:
1. Adam 进行第1 手,此后双方轮流操作。
2. 第 i 手的操作者,可以且必须在0 和1 之间选择,并相应地抹掉某些串。具体地,若选择
0(1),则抹掉第i 位为0(1)的所有串。长度短于i 的串,也须抹掉。
3. 一方操作之后若将所有串都抹掉了,则判该方失败。
若两人皆明智,则胜负必然确定。不幸的是他俩虽明智却更懒惰,不愿慢慢计算却又迫切想知道:
对于每个i,倘若对前i 个串进行博弈,谁将获胜。请你本着帮舍友找对象的精神写个程序帮帮他俩。
【输入】
第一行含一个正整数n,表示初始在墙上的01 串总数。接下来的n 行依次给出第1~n 个01 串。
【输出】
若干行,每行由空格分隔为三部分。首先是"Adam"或"Eve",代表必胜方;接着是正整数start
和end,表示必胜的结果从前start 行持续到前end 行。
各行按start 值递增输出,且相邻行的必胜方互异。-[1 Descr iption
Adam and Eve were expelled from the Garden of Eden, the building is surrounded by high walls. The high walls of the n line 01 strings. The two have nothing to do, so
String on these 01 do the following game:
1. Adam hand, after the two sides take turns operating.
2 the operation of the i-th hand, can and must be selected between 0 and 1, and accordingly to erase certain string. Specifically, if you choose
0 (1), and then erase the bit i 0 (1) all the strings. Length shorter than a string of i, it must be erased.
Party action all strings are erased, the judgment against the party failed.
If two people are wise, the outcome will inevitably determine. Unfortunately They is wise but more lazy and do not want to slowly calculation but urgently want to know:
For each i, if the i-th string game, who will win. Please write a program to help the spirit of to help roommates find object They.
[Input]
The first line contains a positive integer n represents the total number
Adam 和Eve 被赶出伊甸园后,盖起了四面高墙。高墙上写着n 行01 串。两人无事可做,于是
开始就这些01 串做如下博弈:
1. Adam 进行第1 手,此后双方轮流操作。
2. 第 i 手的操作者,可以且必须在0 和1 之间选择,并相应地抹掉某些串。具体地,若选择
0(1),则抹掉第i 位为0(1)的所有串。长度短于i 的串,也须抹掉。
3. 一方操作之后若将所有串都抹掉了,则判该方失败。
若两人皆明智,则胜负必然确定。不幸的是他俩虽明智却更懒惰,不愿慢慢计算却又迫切想知道:
对于每个i,倘若对前i 个串进行博弈,谁将获胜。请你本着帮舍友找对象的精神写个程序帮帮他俩。
【输入】
第一行含一个正整数n,表示初始在墙上的01 串总数。接下来的n 行依次给出第1~n 个01 串。
【输出】
若干行,每行由空格分隔为三部分。首先是"Adam"或"Eve",代表必胜方;接着是正整数start
和end,表示必胜的结果从前start 行持续到前end 行。
各行按start 值递增输出,且相邻行的必胜方互异。-[1 Descr iption
Adam and Eve were expelled from the Garden of Eden, the building is surrounded by high walls. The high walls of the n line 01 strings. The two have nothing to do, so
String on these 01 do the following game:
1. Adam hand, after the two sides take turns operating.
2 the operation of the i-th hand, can and must be selected between 0 and 1, and accordingly to erase certain string. Specifically, if you choose
0 (1), and then erase the bit i 0 (1) all the strings. Length shorter than a string of i, it must be erased.
Party action all strings are erased, the judgment against the party failed.
If two people are wise, the outcome will inevitably determine. Unfortunately They is wise but more lazy and do not want to slowly calculation but urgently want to know:
For each i, if the i-th string game, who will win. Please write a program to help the spirit of to help roommates find object They.
[Input]
The first line contains a positive integer n represents the total number
(系统自动生成,下载前可以参看下载内容)
下载文件列表
zerone/readme.txt
zerone/zerone.cpp
zerone
zerone/zerone.cpp
zerone
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.