/* 啥也不说了,直接套模板... */ 1 #include<iostream> #include<map> #include<string> #include<cstring> #include<queue> #define N 500000 using namespace std; class AC_Atomata { public: int nodeN;//trie树的节点个数 ];//trie树 int f[N];//失配函数 //ma…
S-Nim Time Limit: 1000MS Memory Limit: 32768KB 64bit IO Format: %I64d & %I64u Submit Status Description Arthur and his sister Caroll have been playing a game called Nim for some time now. Nim is played as follows: The starting position has a numb…
Catch That Cow Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 76935 Accepted: 24323 Description Farmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,00…
Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 11573 Accepted Submission(s): 2823 Problem Description 可 怜的公主在一次次被魔王掳走一次次被骑士们救回来之后,而今,不幸的她再一次面临生命的考验.魔王已经发出消息说将在T时刻吃掉公主,因为他听信谣言说吃 公主的肉也能长生不老.年迈…
Time Limit:2000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u Description Vasya has found a strange device. On the front panel of a device there are: a red button, a blue button and a display showing some positive integer. After click…
Knights of the Round Table Description Being a knight is a very attractive career: searching for the Holy Grail, saving damsels in distress, and drinking with the other knights are fun things to do. Therefore, it is not very surprising that in recent…
Connections between cities Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 4425 Accepted Submission(s): 1263 Problem Description After World War X, a lot of cities have been seriously damag…
Labeling Balls Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 9641 Accepted: 2636 Description Windy has N balls of distinct weights from 1 unit to N units. Now he tries to label them with 1 to N in such a way that: No two balls share the…
http://poj.org/problem?id=1475 http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=249 Pushing Boxes Time Limit: 2000MS Memory Limit: 131072K Total Submissions: 4662 Accepted: 1608 Special Judge Description Imagine you are standing insid…
这是第一次全部做出来的依次练习了,有一些都是做过两遍了的,但是还是错了几回,更多时候我还是应该多注意下细节,就好像章爷笑我 的一样,像什么vis[]标记没清0,什么格式错误,还有什么题目没看清,还是的注意一下了. 地址:8.1搜索练习 Problem A POJ 2488 A Knight's Journey 题目大意就是说帮你给你个P*Q的棋盘,让马一次全部走完,每个点只能走一次,而且要按照字典序输出(这句话最坑!!!). 这道题做过了两三次了,却老是被那句“字典序输出”给坑死.第一次看到这道…
诡异的楼梯 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/65536 K (Java/Others)Total Submission(s): 9588 Accepted Submission(s): 2360 Problem Description Hogwarts正式开学以后,Harry发现在Hogwarts里,某些楼梯并不是静止不动的,相反,他们每隔一分钟就变动一次方向. 比如下面的例子里,一开始楼梯在竖直…