Calabash and Landlord Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 3228    Accepted Submission(s): 613 Problem Description Calabash is the servant of a landlord. The landlord owns a piece o…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4864 Task Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1035    Accepted Submission(s): 245 Problem Description Today the company has m tasks to…
Lucky Number Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 664    Accepted Submission(s): 194 Problem Description “Ladies and Gentlemen, It’s show time! ”   “A thief is a creative artist wh…
Area of Mushroom Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 2390    Accepted Submission(s): 578 Problem Description Teacher Mai has a kingdom with the infinite area. He has n students guard…
原题地址 Sequence Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 1186    Accepted Submission(s): 433 Problem Description Let us define a sequence as below ⎧⎩⎨⎪⎪⎪⎪⎪⎪F1F2Fn===ABC⋅Fn−2+D⋅Fn−1+⌊Pn⌋ Y…
Magical Forest Time Limit: 24000/12000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 134    Accepted Submission(s): 69 Problem Description    There is a forest can be seen as N * M grid. In this forest, there is…
Stupid Tower Defense Time Limit: 12000/6000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 151    Accepted Submission(s): 32 Problem Description    FSF is addicted to a stupid tower defense game. The goal of towe…
http://acm.hdu.edu.cn/showproblem.php?pid=6304 题意 给出一个数列的定义,a[1]=a[2]=1,a[n]=a[n-a[n-1]]+a[n-1-a[n-2]](n>=3).求前n项和,n<=1e18. 分析 一看就是得打表找规律或推公式的题目. 先把a[i]打出来: 1 1 2 2 3 4 4 4 5 6 6... 乍眼一看每个数字出现的次数有点意思,于是打出每个数出现次数: 数值   1  2  3  4  5  6  7  8  9  10 …
http://acm.hdu.edu.cn/showproblem.php?pid=5755 题意:一个N*M的矩阵,改变一个格子,本身+2,四周+1.同时mod 3;问操作多少次,矩阵变为全0.输出次数和具体位置 由于影响是相互的,所以增广矩阵的系数a[t][t+1] 或者是 a[t+1][t]均可:只需注意往结果中添加位置时,x[i]表示要操作x[i]次,所以位置要重复添加x[i]次: 高斯消元时间复杂度为O(N3M3); #pragma comment(linker, "/STACK:10…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5738 题意:从n(n <= 1000)个点(有重点)中选出m(m > 1)个点(选出的点只看标号,不看具体坐标)合成一个集合,问集合中的点共线(可以重合)的集合个数? 思路:按照x,y双关键字排序,之后对每一个点求出所有以它为一个端点的线段个数: 及时计数:要求以当前点为端点的线段数,分成两种情况: 1. 线段就为当前点,即将当前点的重点合成一个点,C(n,2)+C(n,3)+...+C(n,n)…