520123zk 520123zxc
总躲不过、离别的悲感。记忆深处的朋友、曾经要好的同学、都会随着时间而淡忘。原来、人就是这样
关注数: 87 粉丝数: 169 发帖数: 9,611 关注贴吧数: 90
8659 Mine Sweeping华农2010的ACM校赛题应该用回溯法做的(求大 Mine sweeping is one of the most important operations, so a special machine has been invented to detect mines. We assume the fields which need to be detected are configuration as several continuous grids, and there is at most one mine in each grid (See Fig a).When using the machine to detect the ith grid, the machine will provide the number xi, which means the total number of mines in the ith, (i-1)th and (i+1)th grids. Except the first and last grid, the detect result of the first grid is the number of 1st and 2nd grid, and the result of the last grid is the last and the last but two grids. The approximate detect result for Fig a is as Fig b. However, some of these machines may have bugs and provide unreal result. For example, one of the unreal detect result for Fig a is as Fig c. The red grid is unreal result.It is clearly that Fig b is possible result, but Fig c is not. Now, give you the detect result for a given field, please calculate if this result is possible. 输入格式 The first line of input is an integer T (T <= 100), indicate the number of test cases. Each test case contains two lines. The first line of each test case is an integer N (3 <= N <= 1000), indicate the length of the given field. The second line contains N integers Xi (0 <= Xi <= 3), each Xi indicate the detect result for grid i. 输出格式 If the detect result is possible, please output “YES”, otherwise, output “NO”.
青梅煮酒改篇版 祖名与震东二人对坐,开怀对吸。 吸至半酣,名曰:“震东久历四方,必知当世明星。请试指言之。” 东曰:“东肉眼安识明星?” 名曰:“休得过谦。 震东曰:“张默,名门之后,演技精湛,可为明星否?” 名笑曰:“纨绔子弟,吸毒二度进宫者,早晚必败家!” 东曰:“好声音李代沫,一战成名,可为明星? 名笑曰:“代沫相貌平平,入行尚浅,徒靠歌喉称霸,导师照顾,非明星也。 东曰:“有一人尝演虚竹,在丁老怪围攻之中百毒不侵,高虎可为明星?” 名曰:“高虎老迈昏聩,其天龙八部早已是强弩之末,非明星也。” 东曰:“大红十字郭美美,可为明星乎?” 名曰:“美美虽出红会,手握数G种子,然扰乱市场秩序,私设赌场,干爹伏法,是故卖萌也,何足为明星!” 东曰:“如张耀扬等辈皆何如?” 名鼓掌大笑曰:“此等碌碌之辈,冢中枯骨,何足挂齿!” 东曰:“舍此之外,某实不知。” 名曰:“夫明星者,胸怀大志,腹有良谋,青春偶像出生,脑残粉无数,亦或是龙的传人。” 东曰:“谁能当之?”名以手指东,后自指,曰:“今天下明星,惟震东与名耳!” 东闻言,大惊,手中所持器具,不觉落于地下。时正值天雨将至,雷声大作。 东乃从容俯首拾箸曰:“实不相瞒,弟已无片可演,天下之大,竟无立足之地。” 名笑曰:“天朝有编剧宁财神,筹划监狱风云,尚缺一男主,吾弟何不从之?” 东大喜,正欲答谢,忽闻警笛响,数警察入内,定睛而视,乃逮捕令也。
首页 1 2 下一页