- 博客(222)
- 资源 (28)
- 收藏
- 关注
原创 hdu 1113 Word Amalgamation 字符串处理 ,加上哈希 ,水题~
Problem DescriptionIn millions of newspapers across the United States there is a word game called Jumble. The object of this game is to solve a riddle, but in order to find the letters that appear in the answer it is necessary to unscramble four words. Yo
2015-03-16 20:58:20 861
原创 hdu 1088 Write a simple HTML Browser 字符串处理
Problem 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 forget to install a HTML browser? This is very easy because most of the times you don't need one on a MAC becau
2015-03-16 20:15:33 761
原创 hdu 1062 Text Reverse 字符串处理。简单水题
Problem DescriptionIgnatius likes to write words in reverse way. Given a single line of text which is written by Ignatius, you should reverse all the words and then output them. InputThe input contains several test cases. The first line of the input i
2015-03-15 11:07:44 1204
原创 hdu 1247 Hat’s Words 字典树,还是比较有意思的题目
Problem DescriptionA hat’s word is a word in the dictionary that is the concatenation of exactly two other words in the dictionary.You are to find all the hat’s words in a dictionary. InputStandard input consists of a number of lowercase words, one p
2015-03-14 16:37:04 1152
原创 hdu 1124 Factorial 数论,就是求一个数的阶乘的结果末尾有多少0.
Problem DescriptionThe most important part of a GSM network is so called Base Transceiver Station (BTS). These transceivers form the areas called cells (this term gave the name to the cellular phone) and every phone connects to the BTS with the strongest
2015-03-14 15:25:12 807
原创 hdu 1214 圆桌会议 简单数论
Problem DescriptionHDU ACM集训队的队员在暑假集训时经常要讨论自己在做题中遇到的问题.每当面临自己解决不了的问题时,他们就会围坐在一张圆形的桌子旁进行交流,经过大家的讨论后一般没有解决不了的问题,这也只有HDU ACM集训队特有的圆桌会议,有一天你也可以进来体会一下哦:),在一天在讨论的时候,Eddy想出了一个极为古怪的想法,如果他们在每一分钟内,一对相邻的两个ACM队员交换一下位子,那么要多少时间才能得到与原始状态相反的座位顺序呢?(即对于每个队员,原先在他左面的队员后来在他右面
2015-03-14 15:07:41 902
原创 hdu 1262 寻找素数对 数论 打表。
Problem Description哥德巴赫猜想大家都知道一点吧.我们现在不是想证明这个结论,而是想在程序语言内部能够表示的数集中,任意取出一个偶数,来寻找两个素数,使得其和等于该偶数.做好了这件实事,就能说明这个猜想是成立的.由于可以有不同的素数对来表示同一个偶数,所以专门要求所寻找的素数对是两个值最相近的. Input输入中是一些偶整数M(5<M<=10000). Output对于每个偶数,输出两个彼此最接近的素数,其和等于该偶数.
2015-03-14 14:45:15 963
原创 hdu 2964 Prime Bases 数论~~
Problem DescriptionGiven any integer base b >= 2, it is well known that every positive integer n can be uniquely represented in base b. That is, we can writen = a0 + a1*b + a2*b*b + a3*b*b*b + ... where the coefficients a0, a1, a2, a3, ... are between
2015-03-13 17:39:39 989
原创 hdu 2674 N!Again 数论水题啊~~~
Problem DescriptionWhereIsHeroFrom: Zty, what are you doing ?Zty: I want to calculate N!......WhereIsHeroFrom: So easy! How big N is ?Zty: 1 <=N <=1000000000
2015-03-13 15:09:23 861
原创 hdu 2161 Primes 筛法求素数 大水题
Problem DescriptionWrite a program to read in a list of integers and determine whether or not each number is prime. A number, n, is prime if its only divisors are 1 and n. For this problem, the numbers 1 and 2 are not considered primes. InputEach inp
2015-03-13 13:48:12 1429
原创 hdu 1395 2^x mod n = 1 暴力过~~最好学下欧拉定理~~~
Problem DescriptionGive a number n, find the minimum x(x>0) that satisfies 2^x mod n = 1. InputOne positive integer on each line, the value of n. OutputIf the minimum x exists, print a line with 2^x mod n = 1.Print 2^? mod n = 1 otherwise.You
2015-03-13 09:27:13 1719 1
原创 hdu 1492 The number of divisors(约数) about Humble Numbers 数论~~
Problem DescriptionA number whose only prime factors are 2,3,5 or 7 is called a humble number. The sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, 25, 27, ... shows the first 20 humble numbers. Now given a humble number, please w
2015-03-12 15:32:41 1240
原创 hdu 1220 Cube 简单数论
Problem DescriptionCowl is good at solving math problems. One day a friend asked him such a question: You are given a cube whose edge length is N, it is cut by the planes that was paralleled to its side planes into N * N * N unit cubes. Two unit cubes may
2015-03-12 14:27:15 934
原创 hdu 1212 Big Number 数论~大数取余,,还记得秦九昭算法吗~~
Problem DescriptionAs we know, Big Number is always troublesome. But it's really important in our ACM. And today, your task is to write a program to calculate A mod B.To make the problem easier, I promise that B will be smaller than 100000.Is it too h
2015-03-11 18:48:44 1253
原创 hdu 1141 Factstone Benchmark 数论水题,,阶乘用斯特林公式
Problem DescriptionAmtel has announced that it will release a 128-bit computer chip by 2010, a 256-bit computer by 2020, and so on, continuing its strategy of doubling the word-size every ten years. (Amtel released a 64-bit computer in 2000, a 32-bit comp
2015-03-11 15:26:00 970
原创 hdu 1065 I Think I Need a Houseboat 水题,不过看discuss,应该有很多人在PI上栽跟头了
Fred Mapper is considering purchasing some land in Louisiana to build his house on. In the process of investigating the land, he learned that the state of Louisiana is actually shrinking by 50 square miles each year, due to erosion caused by the Mississipp
2015-03-11 14:10:51 1561
原创 hdu 1071 The area 高数积分求面积~~~~小水题~~
Problem DescriptionIgnatius bought a land last week, but he didn't know the area of the land because the land is enclosed by a parabola and a straight line. The picture below shows the area. Now given all the intersectant points shows in the picture, can
2015-03-10 18:16:54 1277
原创 hdu 1018 Big Number 两种方法 log方法(300+ms)+斯特林公式(0+ms)
Problem DescriptionIn many applications very large integers numbers are required. Some of these applications are using keys for secure transmission of data, encryption, etc. In this problem you are given a number, you have to determine the number of digit
2015-03-10 17:02:39 1129
原创 hdu 1147 Pick-up sticks 判断线段相交 ~~ 注意判断顺序!!不然容易超时
Problem DescriptionStan has n sticks of various length. He throws them one at a time on the floor in a random way. After finishing throwing, Stan tries to find the top sticks, that is these sticks such that there is no stick on top of them. Stan has notic
2015-03-10 11:07:29 977
原创 hdu 1115 Lifting the Stone 计算几何
Problem DescriptionThere are many secret openings in the floor which are covered by a big heavy stone. When the stone is lifted up, a special mechanism detects this and activates poisoned arrows that are shot near the opening. The only possibility is to l
2015-03-09 18:49:35 912
原创 hdu1086 You can Solve a Geometry Problem too 计算几何求线段交点个数,快速排斥实验+跨立实验
Problem DescriptionMany geometry(几何)problems were designed in the ACM/ICPC. And now, I also prepare a geometry problem for this final exam. According to the experience of many ACMers, geometry problems are always much trouble, but this problem is very eas
2015-03-09 17:18:45 871
原创 hdu 3661 Assignments 贪心
Problem DescriptionIn a factory, there are N workers to finish two types of tasks (A and B). Each type has N tasks. Each task of type A needs xi time to finish, and each task of type B needs yj time to finish, now, you, as the boss of the factory, need to
2015-03-08 17:11:32 850
原创 hdu 1849 Rabbit and Grass 谁都喜欢刷水题。。尼姆博弈
大学时光是浪漫的,女生是浪漫的,圣诞更是浪漫的,但是Rabbit和Grass这两个大学女生在今年的圣诞节却表现得一点都不浪漫:不去逛商场,不去逛公园,不去和AC男约会,两个人竟然猫在寝食下棋……说是下棋,其实只是一个简单的小游戏而已,游戏的规则是这样的:1、棋盘包含1*n个方格,方格从左到右分别编号为0,1,2,…,n-1;2、m个棋子放在棋盘的方格上,方格可以为空,也可以放多于一个的棋子;3、双方轮流走棋;4、每一步可以选择任意一个棋子向左移动到任意的位置(可以多个棋子位于同一个方格),当然,任
2015-03-08 16:08:39 986
原创 hdu 2553 N皇后问题 经典搜索,DFS解法
在N*N的方格棋盘放置了N个皇后,使得它们不相互攻击(即任意2个皇后不允许处在同一排,同一列,也不允许处在与棋盘边框成45角的斜线上。你的任务是,对于给定的N,求出有多少种合法的放置方法。 Input共有若干行,每行一个正整数N≤10,表示棋盘和皇后的数量;如果N=0,表示结束。 Output共有若干行,每行一个正整数,表示对应输入行的皇后的不同放置数量。
2015-03-07 22:21:26 1094
原创 hdu 1255 覆盖的面积 线段树求面积的交 我感觉有点难啊~~第一次写这种类型的
给定平面上若干矩形,求出被这些矩形覆盖过至少两次的区域的面积. Input输入数据的第一行是一个正整数T(1<=T<=100),代表测试数据的数量.每个测试数据的第一行是一个正整数N(1<=N<=1000),代表矩形的数量,然后是N行数据,每一行包含四个浮点数,代表平面上的一个矩形的左上角坐标和右下角坐标,矩形的上下边和X轴平行,左右边和Y轴平行.坐标的范围从0到100000.注意:本题的输入数据较多,推荐使用scanf读入数据. Output对于每组测试数据,请计算出被这些矩形覆
2015-03-07 20:34:51 929
原创 hdu 1050 Moving Tables 简单题,不知道属于什么类型
he famous ACM (Advanced Computer Maker) Company has rented a floor of a building whose shape is in the following figure. The floor has 200 rooms each on the north side and south side along the corridor. Recently the Company made a plan to reform its s
2015-03-06 21:09:50 864
原创 hdu 1049 Climbing Worm 以为贪心题,刷之,发现真水。
Problem 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 minute before climbing again. During the rest, it slips down d inches. The process of climbing and restin
2015-03-06 20:33:03 724
原创 hdu1159 Common Subsequence 最长公共子串
Problem DescriptionA subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = <x1, x2, ..., xm> another sequence Z = <z1, z2, ..., zk> is a subsequence of X if there exists a strictly increasi
2015-03-06 19:46:34 813
原创 hdu2717 Catch That Cow BFS简单题
Problem DescriptionFarmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,000) on a number line and the cow is at a point K (0 ≤ K ≤ 100,000) on the same number line. Farmer
2015-03-06 19:44:54 882
原创 hdu 3172 Virtual Friends 并查集的应用,输入有坑!!!!
Problem DescriptionThese days, you can do all sorts of things online. For example, you can use various websites to make virtual friends. For some people, growing their social network (their friends, their friends' friends, their friends' friends' friends,
2015-03-06 19:38:45 857
原创 hdu 1574 RP问题 动态规划,01背包的变形
Problem Description在人类社会中,任何个体都具有人品,人品有各种不同的形式,可以从一种形式转换为另一种形式,从一个个体传递给另一个个体,在转换和传递的过程中,人品不会消失,也不被能创造,这就是,人品守恒定律!人品守恒定律更形象的描述,当发生一件好事,你从中获利,必定消耗一定量RP;当发生一件不幸的事,你在其中有所损失,必定积攒一定量RP。假设在一个时间段内在你身上可能会发生N个事件,每个事件都对应一个RP变化值a、RP门槛值b和获益值c。当RP变化值a为正,获益值c必定为负,只有你当
2015-03-06 19:35:50 1018
原创 hdu 1045 Fire Net DFS入门题
Problem DescriptionSuppose that we have a square city with straight streets. A map of a city is a square board with n rows and n columns, each representing a street or a piece of wall. A blockhouse is a small castle that has four openings through which
2015-03-06 10:47:20 857
原创 hdu 4296 Buildings 贪心算法 今日首A 详细解析 ,有些数据类型最好用long long
Problem Description Have you ever heard the story of Blue.Mary, the great civil engineer? Unlike Mr. Wolowitz, Dr. Blue.Mary has accomplished many great projects, one of which is the Guanghua Building. The public opinion is that Guanghua Building is no
2015-03-05 20:09:16 1234
原创 hdu 1171 Big Event in HDU 母函数解法。。以后再来用背包A一下
Problem DescriptionNowadays, we all know that Computer College is the biggest department in HDU. But, maybe you don't know that Computer College had ever been split into Computer College and Software College in 2002.The splitting is absolutely a big even
2015-03-04 16:50:30 855
原创 hdu 1052 Tian Ji -- The Horse Racing 可恶的贪心-------也算是经典贪心题吧,对于一般人来说,不看题解,应该很难做出来吧
Problem DescriptionHere is a famous story in Chinese history."That was about 2300 years ago. General Tian Ji was a high official in the country Qi. He likes to play horse racing with the king and others.""Both of Tian and the king have three horses in
2015-03-04 15:19:09 1019
原创 hdu 1026 Ignatius and the Princess I 广搜+优先队列+记录路径
Problem DescriptionThe Princess has been abducted by the BEelzebub feng5166, our hero Ignatius has to rescue our pretty Princess. Now he gets into feng5166's castle. The castle is a large labyrinth. To make the problem simply, we assume the labyrinth is a
2015-03-04 09:44:27 829
原创 hdu 1085 Holding Bin-Laden Captive! 母函数的基本运用,,还是不难的
Problem DescriptionWe all know that Bin-Laden is a notorious terrorist, and he has disappeared for a long time. But recently, it is reported that he hides in Hang Zhou of China! “Oh, God! How terrible! ”Don’t be so afraid, guys. Although he hides in
2015-03-02 20:55:45 1007
原创 hdu 1398 Square Coins 又是母函数模板题~~俗话说的好,饭可一日不吃,水题不可一日不刷
Problem DescriptionPeople in Silverland use square coins. Not only they have square shapes but also their values are square numbers. Coins with values of all square numbers up to 289 (=17^2), i.e., 1-credit coins, 4-credit coins, 9-credit coins, ..., and
2015-03-02 19:56:39 926
原创 hdu 1028 Ignatius and the Princess III 母函数水题,,大家注意了,,我要开始刷母函数了~~
Ignatius and the Princess IIITime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 14352 Accepted Submission(s): 10102Problem Description"Well, it seems the first problem is too easy. I will let y
2015-03-02 19:00:12 2679
原创 蓝桥杯 历届试题 约数倍数选卡片 求大神指点 首先声明,我的代码有问题,!不喜勿进,若有意向,可以讨论,我百度不到这道题的题解
闲暇时,福尔摩斯和华生玩一个游戏: 在N张卡片上写有N个整数。两人轮流拿走一张卡片。要求下一个人拿的数字一定是前一个人拿的数字的约数或倍数。例如,某次福尔摩斯拿走的卡片上写着数字“6”,则接下来华生可以拿的数字包括: 1,2,3, 6,12,18,24 .... 当轮到某一方拿卡片时,没有满足要求的卡片可选,则该方为输方。 请你利用计算机的优势计算一下,在已知所有卡片上的数字和可选哪些数字的条件下,怎样选择才能保证必胜! 当选多个数字都可以必胜时,输出其中最小的数字。如果无论如何都会输,
2015-03-02 16:31:31 2128
mail.jar和activation.jar
2015-11-29
javaMail文档
2015-11-29
现代编译原理(虎书,包含c版和java版中英文,源码,全书答案
2015-07-28
java api1.6中文文档
2015-07-24
传智播客Java_SE基础毕向东老师全程笔记
2015-07-24
EditPlus V3.6.0.740中文破解版
2015-07-24
cocos2d-x3.3 坦克大战
2015-07-07
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人