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

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

HDU 2079 选课时间(题目已修改,注意读题)(简单的母函数运用)
摘要:选课时间(题目已修改,注意读题)Time Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1516Accepted Submission(s): 1253Problem Description又到了选课的时间了,xhd看着选课表发呆,为了想让下一学期好过点,他想知道学n个学分共有多少组合。你来帮帮他吧。(xhd认为一样学分的课没区别)Input输入数据的第一行是一个数据T,表示有T组数据。每组数据的第一行是两个整数n(1 <= n <= 40 阅读全文

posted @ 2012-04-17 22:37 kuangbin 阅读(544) 评论(0) 推荐(0) 编辑

HDU 1028 Ignatius and the Princess III (母函数,或者DP)
摘要:Ignatius and the Princess IIITime Limit : 2000/1000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 2Accepted Submission(s) : 2Font: Times New Roman | Verdana | GeorgiaFont Size: ← →Problem Description"Well, it seems the first problem is too easy. I will let you know 阅读全文

posted @ 2012-04-16 23:48 kuangbin 阅读(5164) 评论(1) 推荐(0) 编辑

HDU 4034 Graph
摘要:GraphTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65768/65768 K (Java/Others)Total Submission(s): 962Accepted Submission(s): 510Problem DescriptionEveryone knows how to calculate the shortest path in a directed graph. In fact, the opposite problem is also easy. Given the length of shortest pa 阅读全文

posted @ 2012-04-13 21:34 kuangbin 阅读(352) 评论(0) 推荐(0) 编辑

HDU 1211 RSA(数列题目)
摘要:RSATime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 706Accepted Submission(s): 524Problem DescriptionRSA is one of the most powerful methods to encrypt data. The RSA algorithm is described as follow:> choose two large prime integer p, q> calcu 阅读全文

posted @ 2012-04-06 00:04 kuangbin 阅读(551) 评论(0) 推荐(0) 编辑

HDU 2817 A sequence of numbers(数列,简单题)
摘要:A sequence of numbersTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1129Accepted Submission(s): 359Problem DescriptionXinlv wrote some sequences on the paper a long time ago, they might be arithmetic or geometric sequences. The numbers are not ver 阅读全文

posted @ 2012-04-05 23:08 kuangbin 阅读(2253) 评论(0) 推荐(0) 编辑

HDU 1792 A New Change Problem(数学规律题,数论知识)
摘要:A New Change ProblemTime Limit: 5000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 533Accepted Submission(s): 265Problem DescriptionNow 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.P 阅读全文

posted @ 2012-04-05 22:48 kuangbin 阅读(1244) 评论(6) 推荐(0) 编辑

HDU 4198 Quick out of the Harbour(BFS+优先队列)
摘要:Quick out of the HarbourTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 75Accepted Submission(s): 47Problem DescriptionCaptain Clearbeard decided to go to the harbour for a few days so his crew could inspect and repair the ship. Now, a few days lat 阅读全文

posted @ 2012-04-03 21:01 kuangbin 阅读(1072) 评论(0) 推荐(0) 编辑

HDU 1027 Ignatius and the Princess II (产生第m大的排列,STLmap中的next_permutation(array,array+n);)
摘要:Ignatius and the Princess IITime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2272Accepted Submission(s): 1371Problem DescriptionNow our hero finds the door to the BEelzebub feng5166. He opens the door and finds feng5166 is about to kill our pretty P 阅读全文

posted @ 2012-03-30 00:47 kuangbin 阅读(692) 评论(0) 推荐(0) 编辑

HDU 1026 Ignatius and the Princess I (BFS+优先队列,记录路径)
摘要:Ignatius and the Princess ITime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5989Accepted Submission(s): 1816Special JudgeProblem DescriptionThe Princess has been abducted by the BEelzebub feng5166, our hero Ignatius has to rescue our pretty Princess 阅读全文

posted @ 2012-03-30 00:29 kuangbin 阅读(1362) 评论(0) 推荐(0) 编辑

HDU 1049 Climbing Worm(水题)
摘要:Climbing WormTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7047Accepted Submission(s): 4455Problem DescriptionAn inch worm is at the bottom of a well n inches deep. It has enough energy to climb u inches every minute, but then has to rest a minut 阅读全文

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

HDU 1025 Constructing Roads In JGShining's Kingdom(最长上升子序列的长度)
摘要:Constructing Roads In JGShining's KingdomTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7192Accepted Submission(s): 2103Problem DescriptionJGShining's kingdom consists of 2n(n is no more than 500,000) small cities which are located in two 阅读全文

posted @ 2012-03-22 23:50 kuangbin 阅读(2693) 评论(0) 推荐(1) 编辑

HDU 1023 Train Problem II (卡特兰数问题)
摘要:Train Problem IITime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2830Accepted Submission(s): 1562Problem DescriptionAs we all know the Train Problem I, the boss of the Ignatius Train Station want to know if all the trains come in strict-increasing o 阅读全文

posted @ 2012-03-21 21:05 kuangbin 阅读(3720) 评论(0) 推荐(1) 编辑

HDU 1015 Safecracker (枚举)
摘要:SafecrackerTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3713Accepted Submission(s): 1919Problem Description=== Op tech briefing, 2002/11/02 06:42 CST === "The item is locked in a Klein safe behind a painting in the second-floor library. Kle 阅读全文

posted @ 2012-03-21 19:07 kuangbin 阅读(1698) 评论(0) 推荐(0) 编辑

HDU 1022 Train Problem I (数据结构——栈)
摘要:Train Problem ITime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 9012Accepted Submission(s): 3310Problem DescriptionAs the new term comes, the Ignatius Train Station is very busy nowadays. A lot of student want to get back to school by train(because 阅读全文

posted @ 2012-03-16 02:19 kuangbin 阅读(1049) 评论(0) 推荐(0) 编辑

HDU 1229 还是A+B(水题)
摘要:还是A+BTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 9799Accepted Submission(s): 4814Problem Description读入两个小于10000的正整数A和B,计算A+B。需要注意的是:如果A和B的末尾K(不超过8)位数字相同,请直接输出-1。Input测试输入包含若干测试用例,每个测试用例占一行,格式为"A B K",相邻两数字有一个空格间隔。当A和B同时为0时输入结束,相应的结果不要 阅读全文

posted @ 2012-03-15 02:20 kuangbin 阅读(423) 评论(0) 推荐(0) 编辑

HDU 1228 A + B(水题)
摘要:A + BTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7615Accepted Submission(s): 4307Problem Description读入两个小于100的正整数A和B,计算A+B.需要注意的是:A和B的每一位数字由对应的英文单词给出.Input测试输入包含若干测试用例,每个测试用例占一行,格式为"A + B =",相邻两字符串有一个空格间隔.当A和B同时为0时输入结束,相应的结果不要输出.Outpu 阅读全文

posted @ 2012-03-15 02:14 kuangbin 阅读(453) 评论(0) 推荐(0) 编辑

HDU 1011 Starship Troopers(树形DP)
摘要:Starship TroopersTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4118Accepted Submission(s): 1076Problem DescriptionYou, the leader of Starship Troopers, are sent to destroy a base of the bugs. The base is built underground. It is actually a huge 阅读全文

posted @ 2012-03-14 19:00 kuangbin 阅读(3709) 评论(3) 推荐(0) 编辑

HDU 1009 FatMouse' Trade(贪心)
摘要:FatMouse' TradeTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 20968Accepted Submission(s): 6501Problem DescriptionFatMouse prepared M pounds of cat food, ready to trade with the cats guarding the warehouse containing his favorite food, JavaBea 阅读全文

posted @ 2012-03-13 23:41 kuangbin 阅读(9340) 评论(0) 推荐(3) 编辑

HDU 1007 Quoit Design (最小点对,模板题)
摘要:题目很明显,答案就是最小点对距离的一半。最小点对的算法就是分治,把所以点分成两部分,然后合起来,重点是怎么样合起来。算法思想不再赘述,记得有很多资料说这个的。大致思想就是按照x坐标排序,分成左右两部分,求左半部分的最小距离,右半部分的最小距离,d=min(d1,d2)。还有就是分界线两侧小于d的点的距离可能是最小点对。代码如下:(套用的是吉林大学的模板,套用模板果然容易出错,一不小心就打错,多理解)#include<stdio.h>#include<iostream>#include<stdlib.h>#include<string.h>#inc 阅读全文

posted @ 2012-03-13 15:29 kuangbin 阅读(3377) 评论(0) 推荐(0) 编辑

迎接2012新赛季——HDOJ系列热身赛(2) Problem E HDU4165 Pills
摘要:Problem ETime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 0Accepted Submission(s): 0Problem DescriptionAunt Lizzie takes half a pill of a certain medicine every day. She starts with a bottle that contains N pills.On the first day, she removes a rand 阅读全文

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

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

导航

JAVASCRIPT: