随笔分类 -  ACM(HOJ)题目解题报告

上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 27 下一页

迎接2012新赛季——HDOJ系列热身赛(2) Problem A HDU 4161 Iterated Difference
摘要: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 阅读全文

posted @ 2012-03-03 13:11 kuangbin 阅读(444) 评论(0) 推荐(0) 编辑

HDU 1006 Tick and Tick
摘要:题目链接: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 阅读全文

posted @ 2011-12-04 15:17 kuangbin 阅读(4367) 评论(1) 推荐(1) 编辑

HDU 1850 Being a Good Boy in Spring Festival (博弈)
摘要:题目链接: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)的情形。 计算机算法里面有.. 阅读全文

posted @ 2011-11-24 22:53 kuangbin 阅读(1633) 评论(0) 推荐(0) 编辑

HDU 2149 Public Sale (博弈)
摘要: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带上他的全部积蓄,冲往拍卖会 阅读全文

posted @ 2011-11-24 22:08 kuangbin 阅读(660) 评论(0) 推荐(0) 编辑

HDU 1080 Human Gene Functions (DP) by kuangbin
摘要:题目链接: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... 阅读全文

posted @ 2011-11-24 21:07 kuangbin 阅读(372) 评论(0) 推荐(0) 编辑

HDU 1082 Matrix Chain Multiplication by kuangbin
摘要:题目链接: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++; 阅读全文

posted @ 2011-11-24 19:18 kuangbin 阅读(729) 评论(0) 推荐(0) 编辑

HDU 1081 To The Max (DP) 扩展最大子列和,求最大子矩阵和
摘要: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 阅读全文

posted @ 2011-11-24 14:16 kuangbin 阅读(665) 评论(0) 推荐(0) 编辑

2011 ACM 福州赛区现场赛第一题 (A .Xiangqi)HDU 4121 Xiangqi by kuangbin
摘要:Xiangqi HDU4121 阅读全文

posted @ 2011-11-23 19:45 kuangbin 阅读(1856) 评论(3) 推荐(2) 编辑

HDU 2131 Probability(水题) by kuangbin
摘要: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 阅读全文

posted @ 2011-11-15 03:13 kuangbin 阅读(413) 评论(0) 推荐(0) 编辑

HDU 4112Break the Chocolate(2011ACM成都赛区)
摘要: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 阅读全文

posted @ 2011-11-12 16:44 kuangbin 阅读(1060) 评论(2) 推荐(0) 编辑

HDU 4091 Zombie’s Treasure Chest(2011ACM上海赛区预选赛第一题)
摘要: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 阅读全文

posted @ 2011-11-07 18:50 kuangbin 阅读(1013) 评论(0) 推荐(0) 编辑

HDU1084 What Is Your Grade?(水题,简单)
摘要: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 阅读全文

posted @ 2011-11-01 17:32 kuangbin 阅读(2762) 评论(0) 推荐(0) 编辑

HDU 1086 You can Solve a Geometry Problem too(水题,判断线段相交)
摘要: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 阅读全文

posted @ 2011-11-01 01:12 kuangbin 阅读(1771) 评论(0) 推荐(0) 编辑

HDU 1088 Write a simple HTML Browser(水题)
摘要: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 阅读全文

posted @ 2011-11-01 00:50 kuangbin 阅读(2087) 评论(0) 推荐(0) 编辑

Lottery hdu1099
摘要: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 阅读全文

posted @ 2011-10-30 01:33 kuangbin 阅读(1108) 评论(0) 推荐(0) 编辑

Random Sequence 2011ACM福州赛区网络赛
摘要: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 阅读全文

posted @ 2011-10-13 22:30 kuangbin 阅读(685) 评论(1) 推荐(0) 编辑

HDU 4011 Working in Beijing
摘要: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 阅读全文

posted @ 2011-10-04 14:34 kuangbin 阅读(605) 评论(0) 推荐(0) 编辑

hdu 4018 Parsing URL(水题)
摘要: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 阅读全文

posted @ 2011-10-04 14:33 kuangbin 阅读(777) 评论(0) 推荐(0) 编辑

HDU 4015 Mario and Mushrooms
摘要: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 阅读全文

posted @ 2011-10-04 14:31 kuangbin 阅读(777) 评论(0) 推荐(1) 编辑

HDU 4020 Ads Proposal(排序,暴力)
摘要: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 阅读全文

posted @ 2011-10-04 13:29 kuangbin 阅读(541) 评论(0) 推荐(0) 编辑

上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 27 下一页

导航

JAVASCRIPT: