摘要: 练习网络流的好题目,这里给出的是Dinic 阅读全文
posted @ 2017-07-14 23:02 人棍王楼下的AI 阅读(216) 评论(0) 推荐(0) 编辑
摘要: Description sevenzero liked Warcraft very much, but he haven't practiced it for several years after being addicted to algorithms. Now, though he is pl 阅读全文
posted @ 2017-07-14 20:27 人棍王楼下的AI 阅读(226) 评论(0) 推荐(0) 编辑
摘要: Description The country of jiuye composed by N cites. Each city can be viewed as a point in a two- dimensional plane with integer coordinates (x,y). T 阅读全文
posted @ 2017-07-14 20:21 人棍王楼下的AI 阅读(183) 评论(0) 推荐(0) 编辑
摘要: Description Farmer John has purchased a subscription to Good Hooveskeeping magazine for his cows, so they have plenty of material to read while waitin 阅读全文
posted @ 2017-06-11 23:24 人棍王楼下的AI 阅读(197) 评论(0) 推荐(0) 编辑
摘要: Input: 第一行为两个正整数n,m 第二行为n个整数a1..an 最后一行为一个正整数k Output: 为一个整数,代表方案数对1000000007取模的值 Sample Input Sample Output 来自毛爷爷17年论文 Berlekamp-Massey Algorithm直接开算 阅读全文
posted @ 2017-06-05 21:48 人棍王楼下的AI 阅读(180) 评论(0) 推荐(0) 编辑
摘要: Description Each of Farmer John's N cows (1 ≤ N ≤ 1,000) produces milk at a different positive rate, and FJ would like to order his cows according to 阅读全文
posted @ 2017-05-28 16:14 人棍王楼下的AI 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 题目太坑,发一波纪念一下 阅读全文
posted @ 2017-05-26 11:58 人棍王楼下的AI 阅读(120) 评论(0) 推荐(0) 编辑
摘要: Description 考虑一个只包含小写拉丁字母的字符串s。我们定义s的一个子串t的“出 现值”为t在s中的出现次数乘以t的长度。请你求出s的所有回文子串中的最 大出现值。 考虑一个只包含小写拉丁字母的字符串s。我们定义s的一个子串t的“出 现值”为t在s中的出现次数乘以t的长度。请你求出s的所有 阅读全文
posted @ 2017-05-26 11:07 人棍王楼下的AI 阅读(220) 评论(0) 推荐(0) 编辑
摘要: Description 给出一个只由小写英文字符a,b,c...y,z组成的字符串S,求S中最长回文串的长度. 回文就是正反读都是一样的字符串,如aba, abba等Input 输入有多组case,不超过120组,每组输入为一行小写英文字符a,b,c...y,z组成的字符串S 两组case之间由空行 阅读全文
posted @ 2017-05-25 22:48 人棍王楼下的AI 阅读(129) 评论(0) 推荐(0) 编辑
摘要: Description Farmer John has noticed that the quality of milk given by his cows varies from day to day. On further investigation, he discovered that al 阅读全文
posted @ 2017-05-25 12:03 人棍王楼下的AI 阅读(184) 评论(0) 推荐(0) 编辑