摘要:Problem ATime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 0Accepted Submission(s): 0Problem DescriptionYou are given a list of N non-negative integers a(1), a(2), ... , a(N). You replace the given list by a new list: the k-th entry of the new list i
阅读全文
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1006这题做了好久了,学习了网上的解法后自己写出来了。就是枚举12*60分钟,看一分钟内有多少秒是happytime,一分钟内解三个不等式得到区间。具体看代码。代码有注释很详细的。#include<stdio.h>#include<math.h>#include<iostream>#include<algorithm>using namespace std;struct qujian{ double l,r;}; double D;qujian sol
阅读全文
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1850用到的知识:(三)尼姆博奕(Nimm Game):有三堆各若干个物品,两个人轮流从某一堆取任意多的物品,规定每次至少取一个,多者不限,最后取光者得胜。 这种情况最有意思,它与二进制有密切关系,我们用(a,b,c)表示某种局势,首先(0,0,0)显然是奇异局势,无论谁面对奇异局势,都必然失败。第二种奇异局势是(0,n,n),只要与对手拿走一样多的物品,最后都将导致(0,0,0)。仔细分析一下,(1,2,3)也是奇异局势,无论对手如何拿,接下来都可以变为(0,n,n)的情形。 计算机算法里面有..
阅读全文
摘要:Public SaleTime Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1148Accepted Submission(s): 701Problem Description虽然不想,但是现实总归是现实,Lele始终没有逃过退学的命运,因为他没有拿到奖学金。现在等待他的,就是像FarmJohn一样的农田生涯。要种田得有田才行,Lele听说街上正在举行一场别开生面的拍卖会,拍卖的物品正好就是一块20亩的田地。于是,Lele带上他的全部积蓄,冲往拍卖会
阅读全文
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1080#include<stdio.h>#include<algorithm>using namespace std;int dp[110][110];int Maxtri[5][5]={ {0,-3,-4,-2,-1}, {-3,5,-1,-2,-1}, {-4,-1,5,-3,-2}, {-2,-2,-3,5,-2}, {-1,-1,-2,-2,5}}; int num1[110];int num2[110];int main(){ // freop...
阅读全文
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1082writed by kuangbin题目大意:大意就是给你n个矩阵,再给你一个矩阵链,先判断矩阵链是否合法,再计算这个矩阵链要做多少次乘法。代码:#include<stdio.h>#include<string.h>int a[26][2];int zhan[1000][2];int top;int sum;char str[1000];int jin(int x){ zhan[top][0]=a[x][0]; zhan[top][1]=a[x][1]; top++;
阅读全文
摘要:To The MaxTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3768Accepted Submission(s): 1798Problem DescriptionGiven a two-dimensional array of positive and negative integers, a sub-rectangle is any contiguous sub-array of size 1 x 1 or greater locat
阅读全文
摘要:ProbabilityTime Limit: 3000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2313Accepted Submission(s): 1146Problem DescriptionMickey is interested in probability recently. One day , he played a game which is about probability with mini.First mickey gives a letter
阅读全文
摘要:Break the ChocolateTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 427Accepted Submission(s): 142Problem DescriptionBenjamin is going to host a party for his big promotion coming up.Every party needs candies, chocolates and beer, and of course Benj
阅读全文
摘要:Zombie’s Treasure ChestTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 994Accepted Submission(s): 211Problem DescriptionSome brave warriors come to a lost village. They are very lucky and find a lot of treasures and a big treasure chest, but with a
阅读全文
摘要:What Is Your Grade?Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4032Accepted Submission(s): 1198Problem Description“Point, point, life of student!”This is a ballad(歌谣)well known in colleges, and you must care about your score in this exam too. H
阅读全文
摘要:You can Solve a Geometry Problem tooTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3077Accepted Submission(s): 1452Problem DescriptionMany geometry(几何)problems were designed in the ACM/ICPC. And now, I also prepare a geometry problem for this fina
阅读全文
摘要:Write a simple HTML BrowserTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3398Accepted Submission(s): 890Problem DescriptionIf you ever tried to read a html document on a Macintosh, you know how hard it is if no Netscape is installed. Now, who can
阅读全文
摘要:LotteryTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1108Accepted Submission(s): 544Problem DescriptionEddy's company publishes a kind of lottery.This set of lottery which are numbered 1 to n, and a set of one of each is required for a prize
阅读全文
摘要:Random SequenceTime Limit: 3000/1000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 202Accepted Submission(s): 124Problem DescriptionThere is a random sequence L whose element are all random numbers either -1 or 1 with the same possibility. Now we define MAVS, the abbr
阅读全文
摘要:Working in BeijingTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 65768/65768 K (Java/Others)Total Submission(s): 659Accepted Submission(s): 333Problem DescriptionMr. M is an undergraduate student of FDU. He finds an intern position in Beijing, so that he cannot attend all the college activities
阅读全文
摘要:Parsing URLTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65768/65768 K (Java/Others)Total Submission(s): 520Accepted Submission(s): 321Problem DescriptionIn computing, a Uniform Resource Locator or Universal Resource Locator (URL) is a character string that specifies where a known resource is
阅读全文
摘要:Mario and MushroomsTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65768/65768 K (Java/Others)Total Submission(s): 265Accepted Submission(s): 220Problem DescriptionMario usually relaxes himself by walking along the shady track near the Mushroom Kingdom. The evil King Koopa noticed that and place
阅读全文
摘要:Ads ProposalTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 65768/65768 K (Java/Others)Total Submission(s): 1063Accepted Submission(s): 410Problem DescriptionThere are N customers set their M different advertisements on Baidu. Each advertisement is owned by single customer. The ads system of Ba
阅读全文