贪心
Saber_Altria
这个作者很懒,什么都没留下…
展开
-
poj-3617
#poj-3617FJ is about to take his N (1 ≤ N ≤ 2,000) cows to the annual"Farmer of the Year" competition. In this contest every farmer arranges his cows in a line and herds them past the judges.The con...原创 2019-01-19 21:58:17 · 294 阅读 · 0 评论 -
[CodeForces-985C]
You have m = n·k wooden staves. The i-th stave has length ai. You have to assemble n barrels consisting of k staves each, you can use any k staves to construct a barrel. Each stave must belong to exac...原创 2019-01-19 23:14:31 · 226 阅读 · 0 评论 -
南昌ICPC2019网络预选M---Subsequence[判断非连续子串]
题目大意:先给你一个母串,再给你 n 个字符串,让你判断这 n 个字符串是否为母串的非连续子串;样例输入abcdefg3abcadgcba样例输出YESYESNO思路:最简单的方法肯定就是拿每个字符串和母串比对,看是否为它的非连续子串。先在母串中找到给定字符串的第一项,再在那个位置的后面寻找第二项。。。以此类推。这肯定会超时。我们假设母串的长度为 s1 ,要判断的字符串长...原创 2019-04-20 20:26:53 · 419 阅读 · 0 评论