04 2018 档案

摘要:炸老师与他的女朋友们 Description qdu最帅的炸老师今天又要抽空去找他的女朋友们了,但是考虑到他的好gay友ycb仍是个单身狗,炸老师作为基友不希望打击他。所以他在找女朋友们的路途中必须要避开ycb老师,可他又不知道ycb的具体位置,只知道一些可能的位置,所以他必须要避开所有这些位置,同 阅读全文
posted @ 2018-04-24 17:25 yzm10 阅读(411) 评论(0) 推荐(0)
摘要:回文字符串 回文串是指aba、abba、cccbccc、aaaa这种左右对称的字符串。每个字符串都可以通过向中间添加一些字符,使之变为回文字符串。 回文字符串 例如:abbc 添加2个字符可以变为 acbbca,也可以添加3个变为 abbcbba。方案1只需要添加2个字符,是所有方案中添加字符数量最 阅读全文
posted @ 2018-04-19 00:09 yzm10 阅读(327) 评论(0) 推荐(0)
摘要:回文串划分 有一个字符串S,求S最少可以被划分为多少个回文串。 例如:abbaabaa,有多种划分方式。 a|bb|aabaa - 3 个回文串 a|bb|a|aba|a - 5 个回文串 a|b|b|a|a|b|a|a - 8 个回文串 其中第1种划分方式的划分数量最少。 a|bb|aabaa - 阅读全文
posted @ 2018-04-18 23:40 yzm10 阅读(353) 评论(0) 推荐(0)
摘要:Knapsack problem Given a set of n items, each with a weight w[i] and a value v[i], determine a way to choose the items into a knapsack so that the tot 阅读全文
posted @ 2018-04-16 23:40 yzm10 阅读(209) 评论(0) 推荐(0)
摘要:Simple String Problem Recently, you have found your interest in string theory. Here is an interesting question about strings. You are given a string S 阅读全文
posted @ 2018-04-15 19:42 yzm10 阅读(341) 评论(0) 推荐(0)
摘要:Mountain Number One integer number x is called "Mountain Number" if: (1) x>0 and x is an integer; (2) Assume x=a[0]a[1]...a[len-2]a[len-1](0≤a[i]≤9, a 阅读全文
posted @ 2018-04-13 18:16 yzm10 阅读(232) 评论(0) 推荐(0)
摘要:最全DP总结 https://blog.csdn.net/cc_again/article/details/25866971 ACM题集 https://blog.csdn.net/liuqiyao_01/article/details/9079611 数位dp模板讲解 https://blog.c 阅读全文
posted @ 2018-04-13 15:57 yzm10 阅读(242) 评论(0) 推荐(0)
摘要:Machine Schedule As we all know, machine scheduling is a very classical problem in computer science and has been studied for a very long history. Sche 阅读全文
posted @ 2018-04-13 09:23 yzm10 阅读(190) 评论(0) 推荐(0)
摘要:String Reconstruction Ivan had string s consisting of small English letters. However, his friend Julia decided to make fun of him and hid the string s 阅读全文
posted @ 2018-04-12 17:01 yzm10 阅读(313) 评论(0) 推荐(0)
摘要:Permutation Counting Given a permutation a1, a2, … aN of {1, 2, …, N}, we define its E-value as the amount of elements where ai > i. For example, the 阅读全文
posted @ 2018-04-12 16:52 yzm10 阅读(341) 评论(0) 推荐(0)
摘要:组合数学推推推最后,推得要求C(n+m,m)%p 其中n,m小于10^9,p小于1^5 用Lucas定理求(Lucas定理求nm较大时的组合数) 因为p数据较小可以直接阶乘打表求逆元 求逆元时,由费马小定理知道p为素数时,a^p-1=1modp可以写成a*a^p-2=1modp 所以a的逆元就是a^ 阅读全文
posted @ 2018-04-09 21:47 yzm10 阅读(284) 评论(0) 推荐(0)
摘要:Sum Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 3980 Accepted Submission(s): 1620 Problem D 阅读全文
posted @ 2018-04-08 22:52 yzm10 阅读(408) 评论(0) 推荐(0)
摘要:Fibonacci-ish Yash has recently learnt about the Fibonacci sequence and is very excited about it. He calls a sequence Fibonacci-ish if You are given s 阅读全文
posted @ 2018-04-05 22:23 yzm10 阅读(278) 评论(0) 推荐(0)
摘要:A Trivial Problem Mr. Santa asks all the great programmers of the world to solve a trivial problem. He gives them an integer m and asks for the number 阅读全文
posted @ 2018-04-05 21:55 yzm10 阅读(289) 评论(0) 推荐(0)