摘要: Play with ChainProblemDescriptionYaoYao is fond of playing his chains. He has a chain containing n diamonds on it. Diamonds are numbered from 1 to n.A... 阅读全文
posted @ 2014-11-07 20:39 PlasticSpirit 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 求整数的拆分数。。一种解法是母函数#include #include #include#include#include#includeusing namespace std;#define MAXN 10000int dp[2][130];int main(){ int n; while... 阅读全文
posted @ 2014-11-07 19:04 PlasticSpirit 阅读(177) 评论(0) 推荐(0) 编辑
摘要: 题意:m条操作指令,对于指令 a b 表示取出第a~b个元素,翻转后添加到排列的尾部。水题卡了一个小时,一直过不了样例。 原来是 dfs输出的时候 忘记向下传递标记了。 1 #include 2 #include 3 #include 4 #include 5 using name... 阅读全文
posted @ 2014-11-07 16:00 PlasticSpirit 阅读(267) 评论(0) 推荐(0) 编辑
摘要: 题目大意:a,b,c,d...z这些字母的价值是1,2,3......26给定 这26个字母分别的数量,求总价值不超过50的单词的数量分析:标准做法是构造母函数把某个单词看作是,关于x的多项式,在这个多项式中形如 a*x^b 这样的项就代表 价值为b的单词有a个。。做法:= =其实不知道母函数也完全... 阅读全文
posted @ 2014-11-07 15:13 PlasticSpirit 阅读(249) 评论(0) 推荐(0) 编辑
摘要: LooploopXXX gets a new toy named Looploop. The toy has N elements arranged in a loop, an arrow pointing to one of the elements, and two preset paramet... 阅读全文
posted @ 2014-11-07 13:41 PlasticSpirit 阅读(346) 评论(0) 推荐(0) 编辑