题目链接:pid=5334">点击打开链接 题目大意:给出一个数字k,要求做出一个长度小于等于10^5的序列.该序列中不同样的连续子序列有k个. 构造啊,.,,,,一点辙都没有 使用连续的数字做成序列,能够省事的计算出不同样的子序列有多少个. 使用n个1,那么不同样子序列有n种. 使用n个1和m个2,那么不同样的子序列有n+m+n*m种. 使用n个1,m个2和l个3,那么不同样的子序列有n+m+l+n*m+n*l+m*l种. 当k小于等于10^5时.直接输出k个1. 当k大于10^5时.对…
Connect the Graph Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 108    Accepted Submission(s): 36 Special Judge Problem Description Once there was a special graph. This graph had n vertices a…
Each soda has some candies in their hand. And they want to make the number of candies the same by doing some taking and giving operations. More specifically, every two adjacent soda x and y can do one of the following operations only once: 1. x-th so…
Buildings Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 472    Accepted Submission(s): 104 Problem Description Your current task is to make a ground plan for a residential building located…
Virtual Participation Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 237    Accepted Submission(s): 56 Special Judge Problem Description As we know, Rikka is poor at math. Yuta is worrying abo…
Virtual Participation Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 705    Accepted Submission(s): 202Special Judge Problem Description As we know, Rikka is poor at math. Yuta is worrying abou…
pid=5288">http://acm.hdu.edu.cn/showproblem.php?pid=5288 Problem Description OO has got a array A of size n ,defined a function f(l,r) represent the number of i (l<=i<=r) , that there's no j(l<=j<=r,j<>i) satisfy ai mod aj=0,now…
pid=5379">http://acm.hdu.edu.cn/showproblem.php? pid=5379 Problem Description Little sun is an artist. Today he is playing mahjong alone. He suddenly feels that the tree in the yard doesn't look good. So he wants to decorate the tree.(The tree has…
老师说下午要让我们(来自开明的新高一同学)感受一下CF,于是下午2:20我们就集中到了机房.老师教我们用Educational Codeforces Round 46 (Rated for Div. 2开了一场Virtual participation,然后就让我们自己打了. 拿到题目先看A题,大意就是让你通过修改最少的字符(不能删除或添加),将A组字符串修改为B组(不考虑顺序,保证有解).拿到题目我就傻眼了,一般CF的div2的题目AB都是比较的简单的呀,而这一道题拿到手尽然毫无思路,以至于丧…
I Wanna Become A 24-Point Master Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 60    Accepted Submission(s): 16 Special Judge Problem Description Recently Rikka falls in love with an old but…
MZL's endless loop Time Limit: 3000/1500 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 898    Accepted Submission(s): 178Special Judge Problem Description As we all kown, MZL hates the endless loop deeply, and he…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5379 题意:一颗n个节点n-1条边的树,现在要给每个节点标号(1~n),要求:(1)每一层的兄弟节点的标号要是连续的(2)每一颗子树的所有节点标号是连续的.问有多少种标号方案. 解法:对于每一层顶多只能存在2个非叶子节点,否则无解:对于每一层有x个叶子节点,y个非叶子节点,那么ans=(ans * x!)%mod,另外如果y!=0,还得ans=2*ans%mod. #include <bits/st…
Backup Plan Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 93    Accepted Submission(s): 36Special Judge Problem Description Makomuno has N servers and M databases. All databases are synchroniz…
周末打了个GDUT的校赛,也是作为SCAU的一场个人排位. 比赛中竟然卡了个特判,1个半钟就切了5条了,然后一直卡. 还有其他两条可以做的题也没法做了,性格太执着对ACM来说也是错呀. 讲回正题 . A  游戏王 . 目的是集齐6张卡, 然后n个小伙伴手上持有卡num, 给出m种集合 , Stubird需要有某个集合中的卡片才能用c的花费去买这张卡片. 做法是状压dp , 开一个 dp[st] , 表示st( 0 <= st < (1<<6) ) 这个集合最小花费 . 然后开一个邻…
Zero Escape Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 289    Accepted Submission(s): 135 Problem Description Zero Escape, is a visual novel adventure video game directed by Kotaro Uchiko…
First One Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 831    Accepted Submission(s): 253 Problem Description soda has an integer array a1,a2,…,an. Let S(i,j) be the sum of ai,ai+1,…,aj. No…
Assignment Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 627    Accepted Submission(s): 318 Problem Description Tom owns a company and he is the boss. There are n staffs which are numbered fr…
http://acm.hdu.edu.cn/showproblem.php? pid=5294 Problem Description Innocent Wu follows Dumb Zhang into a ancient tomb. Innocent Wu's at the entrance of the tomb while Dumb Zhang's at the end of it. The tomb is made up of many chambers, the total num…
Tricks Device Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 1977    Accepted Submission(s): 509 Problem Description Innocent Wu follows Dumb Zhang into a ancient tomb. Innocent Wu’s at the en…
Crazy Bobo Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 131072/65536 K (Java/Others) Total Submission(s): 1215    Accepted Submission(s): 366 Problem Description Bobo has a tree,whose vertices are conveniently labeled by 1,2,...,n.Each nod…
Fantasy magicians usually gain their ability through one of three usual methods: possessing it as an innate talent, gaining it through study and practice, or receiving it from another being, often a god, spirit, or demon of some sort. Some wizards ar…
Solve this interesting problem Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 422    Accepted Submission(s): 98 Problem Description Have you learned something about segment tree? If not, don’t…
Painter Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 895    Accepted Submission(s): 408 Problem Description Mr. Hdu is an painter, as we all know, painters need ideas to innovate , one day,…
Your current task is to make a ground plan for a residential building located in HZXJHS. So you must determine a way to split the floor building with walls to make apartments in the shape of a rectangle. Each built wall must be paralled to the buildi…
Delicious Apples Time Limit: 5000/3000 MS (Java/Others)    Memory Limit: 524288/524288 K (Java/Others) Total Submission(s): 1371    Accepted Submission(s): 448 Problem Description There are n apple trees planted along a cyclic road, which is L metres…
Friends Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 163    Accepted Submission(s): 61 Problem Description There are n people and m pairs of friends. For every pair of friends, they can choo…
Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 593    Accepted Submission(s): 164 Problem Description There are n circles on a infinitely large table.With every two circle, either one contains…
OO’s Sequence Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 449    Accepted Submission(s): 158 Problem Description OO has got a array A of size n ,defined a function f(l,r) represent the nu…
OO's Sequence Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 955    Accepted Submission(s): 358 Problem Description OO has got a array A of size n ,defined a function f(l,r) represent the nu…
Cake Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 965    Accepted Submission(s): 119 Special Judge Problem Description There are m soda and today is their birthday. The 1-st soda has prepa…