Problem E. Matrix from Arrays Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 1384    Accepted Submission(s): 630 Problem Description Kazari has an array A length of L, she plans to generate a…
任意门:http://acm.hdu.edu.cn/showproblem.php?pid=6336 Problem E. Matrix from Arrays Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 1711    Accepted Submission(s): 794 Problem Description Kazari…
Problem Description Now given two kinds of coins A and B,which satisfy that GCD(A,B)=1.Here you can assume that there are enough coins for both kinds.Please calculate the maximal value that you cannot pay and the total number that you cannot pay. Inp…
A Simple Problem with Integers 这个题目首先要打表找规律,这个对2018取模最后都会进入一个循环节,这个循环节的打表要用到龟兔赛跑. 龟兔赛跑算法 floyed判环算法 这个算法我觉得还是很有意思的,可以学习一下. 不过这个题目这个算法打表还是有点难写的. 由这个算法可以得到这个循环节的最大长度是6 最大入环距离是4. 为什么有些循环节不是6,还是可以用6呢,因为每个元素平方最大周期为6,且6是其他所有周期的公倍数. 然后学完之后还是不太会这个题目怎么写,2018…
Cyclic Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 193    Accepted Submission(s): 125 Problem Description Count the number of cyclic permutations of length n with no continuous subsequence…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6336 题目: 题意:给你一个l个元素的数组a,用题目中的程序构造一个新的矩阵,询问q次,问以(x1,y1)为左上角,(x2,y2)为右下角的矩阵内的元素之和(原点在左上角). 思路:我们通过打表可以发现这个大矩阵都是以左上角2l*2l的小矩阵M循环出现的,所以对于每次查询我们只需统计他要查询的矩阵包含多少个完整的M,对于那些不构成完整的行列和,我们首先用前缀和统计出来,最后加起来即可.我的方法用下图…
Prime Ring Problem Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 23458    Accepted Submission(s): 10465 Problem Description A ring is compose of n circles as shown in diagram. Put natural numb…
Pinball Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 568    Accepted Submission(s): 244 Problem Description There is a slope on the 2D plane. The lowest point of the slope is at the origin.…
oval-and-rectangle Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 237    Accepted Submission(s): 93 Problem Description Patrick Star find an oval. The half of longer axes is on the x-axis with…
Everything Has Changed Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 292    Accepted Submission(s): 155Special Judge Problem Description Edward is a worker for Aluminum Cyclic Machinery. His…