Problem Description
Football Manager is a series of football management simulation games developed by Sports Interactive and published by Sega. In this game, you will play a role of a football club m...
分类:
其他好文 时间:
2014-08-11 00:31:01
阅读次数:
400
``Accordian'' PatienceYou are to simulate the playing of games of ``Accordian'' patience, the rules for which are as follows:Deal cards one by one in ...
分类:
其他好文 时间:
2014-08-10 18:11:40
阅读次数:
312
题目链接:点击打开链接
题意:
给定n个字符串,k局游戏
对于每局游戏,2个玩家轮流给一个空串添加一个小写字母使得加完后的字符串不是n个字符串的前缀。
输家下一轮先手
问是先手必胜还是后手必胜
思路:
对于第一局游戏,若先手能到达必败态和必胜态,则先手会一直输到倒数第二局然后最后一局必胜
所以此时是first
若先手是必胜态或者是必败态,则是轮流赢,跟k的奇偶有关
#inclu...
分类:
其他好文 时间:
2014-08-10 13:07:00
阅读次数:
201
Hangman Judge
In ``Hangman Judge,'' you are to write a program that judges a series of Hangman games. For each game, the answer to the puzzle is given as well as the guesses. Rules are t...
分类:
其他好文 时间:
2014-08-09 21:37:19
阅读次数:
414
题目大意:
两个人往一个空的字符串里填单词,每一次只能填一个,而且填完之后要是给出的N个字符串的前缀。
思路分析:
先用给出的所有单词建字典树。
然后从根节点开始dfs。
win [x] 表示踩在x节点上是否有必胜策略
lose [x] 表示踩在x节点上是否有必败策略。
然后是博弈的过程。
如果先手有必胜和必败的策略,那么他可以一直输到k-1
如果只有必胜策略。那么只有当...
分类:
其他好文 时间:
2014-08-09 21:32:19
阅读次数:
255
题目连接: Codeforces 455B A Lot of Games
题目大意:给定n,表示字符串集合。给定k,表示进行了k次游戏,然后是n个字符串。每局开始,字符串为空串,然后两人轮流在末尾追加字符,保证新的字符串为集合中某字符串的前缀,不能操作者输,新一轮由上一句输的人先手。
解题思路:首先对字符集合建立字典树,然后根据博弈的必胜必败性质搜索出先手的决策状态,可决定胜败3,只能...
分类:
其他好文 时间:
2014-08-09 13:31:47
阅读次数:
237
Alex doesn't like boredom. That's why whenever he gets bored, he comes up with games. One long winter evening he came up with a game and decided to play it.
Given a sequence a consisting of n integ...
分类:
其他好文 时间:
2014-08-09 11:42:48
阅读次数:
311
Description
Anton and Dasha like to play different games during breaks on checkered paper. By the 11th grade they managed to play all the games of this type and asked Vova the programmer to come up...
分类:
其他好文 时间:
2014-08-07 13:23:50
阅读次数:
295
题目链接:uva 11927 - Games Are Important
题目大意:给出一张无环有向图,并给出每个节点上的石子数,每次操作可以选择一个石子,向下一个节点移动。两人轮流操作,直到不能操作为失败者。
解题思路:有了图之后,用记忆化的方式处理出每个节点的SG值,取所有石子数为奇数的节点的Nim和。
#include
#include
#include
using n...
分类:
其他好文 时间:
2014-08-07 00:52:57
阅读次数:
245
高斯消元第二题,这次的多元一次方程组的系数是浮点数,高斯消元的模版就有了些改动,但是主要思路还是那样。
题目大意:
给出一个数n,给出前n个字母的描述,问这个字母获得得知的期望是多少。
解题思路:
根据给出的描述列方程。主要难点在字符串处理上。
下面是代码:
#include
#include
#include
#include
#include
#i...
分类:
其他好文 时间:
2014-08-06 23:14:52
阅读次数:
287