传送阵:http://acm.hdu.edu.cn/showproblem.php?pid=4898 题目大意:一个首尾相连的字符串,将其分为k个子串,使得最大的字串最小 将所有子串排序,输出第k小即可 对于有循环节的串,用抽屉原理解决即可 #include<iostream> #include<cstdio> #include<cstring> #include<cstdlib> #include<algorithm> using namesp…
Problem Description There is an old country and the king fell in love with a devil. The devil always asks the king to do some crazy things. Although the king used to be wise and beloved by his people. Now he is just like a boy in love and can’t refus…
题意:给定一个环形字符串,让他把它分成k份,使得最大的字典序 最小. 思路:二分答案,首先很明显答案所有可能是 n*n种  排序可以先求出最长公共前缀,这样比较就只需要比较公共前缀的下一位就能比较出两种答案的字典序大小,这里公共前缀我用 (2*n)*(2*n) DP 求出 .(也可用后缀数组).接下来就是判断了: 这里二分出来的答案就是字典序的上界,(对于没一个位置作为起点,长度越长字典序越大)那么对于当前答案每个位置都可以求出一个能向后跳的最大值(根据如果以这个点做一个串的起点那么字典序要小于…
The Revenge of the Princess’ Knight Problem Description There is an old country and the king fell in love with a devil. The devil always asks the king to do some crazy things. Although the king used to be wise and beloved by his people. Now he is jus…
Ignatius and the Princess I Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 17930    Accepted Submission(s): 5755Special Judge Problem Description The Princess has been abducted by the BEelzebub…
Nim is a mathematical game of strategy in which two players take turns removing objects from distinct heaps. On each turn, a player must remove at least one object, and may remove any number of objects provided they all come from the same heap. ---Wi…
Ignatius and the Princess III Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 25929    Accepted Submission(s): 17918 Problem Description "Well, it seems the first problem is too easy. I will let…
Ignatius and the Princess IV  先搬中文 Descriptions:   给你n个数字,你需要找出出现至少(n+1)/2次的数字 现在需要你找出这个数字是多少? Input 本题包含多组数据,请处理到EOF: 每组数据包含两行. 第一行一个数字N(1<=N<=999999) ,保证N为奇数. 第二行为N个用空格隔开的整数. Output 对于每组数据,输出一行,表示要求找到的那个数 Sample Input 5 1 3 2 3 3 11 1 1 1 1 1 5 5…
Search GO 说明:输入题号直接进入相应题目,如需搜索含数字的题目,请在关键词前加单引号 Problem ID Title Source AC Submit Y 1000 A+B Problem 10983 18765 Y 1036 [ZJOI2008]树的统计Count 5293 13132 Y 1588 [HNOI2002]营业额统计 5056 13607 1001 [BeiJing2006]狼抓兔子 4526 18386 Y 2002 [Hnoi2010]Bounce 弹飞绵羊 43…
http://acm.hdu.edu.cn/showproblem.php?pid=3766 Knight's Trip Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 482    Accepted Submission(s): 106 Problem Description In chess, each move of a knigh…