简单题
LEO丶warning
我是菜鸟,大家可以建一个csdn的账号,一起交流。真的挺好用的
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
hdu 1029
#include#include#include#include#includeusing namespace std;struct node { int hour,minute; //时针和分针位置 double angle_hour,angle_minute,angle_sum; //时针,分针,总角度 int time; }angle[7];bool cmp(node x,node原创 2015-04-07 21:07:56 · 569 阅读 · 0 评论 -
HDU1257——最少拦截系统(贪心)
某国为了防御敌国的导弹袭击,发展出一种导弹拦截系统.但是这种导弹拦截系统有一个缺陷:虽然它的第一发炮弹能够到达任意的高度,但是以后每一发炮弹都不能超过前一发的高度.某天,雷达捕捉到敌国的导弹来袭.由于该系统还在试用阶段,所以只有一套系统,因此有可能不能拦截所有的导弹.怎么办呢?多搞几套系统呗!你说说倒蛮容易,成本呢?成本是个大问题啊.所以俺就到这里来求救了,请帮助计算一下最少需要多少套拦截系统原创 2015-07-24 09:07:43 · 519 阅读 · 0 评论 -
HDU2124——Repair the Wall(贪心水题)
Long time ago , Kitty lived in a small village. The air was fresh and the scenery was very beautiful. The only thing that troubled her is the typhoon.When the typhoon came, everything is terrible. It kept blowing and raining for a long time. And what mad原创 2015-07-28 17:53:42 · 820 阅读 · 0 评论 -
HDU2111——Saving HDU(贪心)
话说上回讲到海东集团面临内外交困,公司的元老也只剩下XHD夫妇二人了。显然,作为多年拼搏的商人,XHD不会坐以待毙的。 一天,当他正在苦思冥想解困良策的时候,突然想到了自己的传家宝,那是公司成立的时候,父亲作为贺礼送来的一个锦囊,徐父当时交代,不到万不得已的时候,不要打开它。“现在不正是最需要的时候吗?”,一边想,XHD一边找到了这个精心保管的锦囊,打开一看,里面只有一句话“杭城北麓千人洞有宝”。 二话不说,XHD拿起一个大口袋就出发了,这个千人洞他是知道的,小的时候,爸爸曾经带他来过这个隐蔽的路口原创 2015-07-28 15:51:02 · 697 阅读 · 0 评论 -
hdu2082找单词——母函数
#include#includeint main(){int c1[55];int c2[55];int num[30]={0};int times;scanf("%d",×);while(times--){for(int i=1;i{scanf("%d",&num[i]);}memset(c2,0,sizeof(c2));原创 2015-06-02 20:43:59 · 594 阅读 · 0 评论 -
hdu1028——母函数
就是母函数的模板,敲上就能过,我还没弄明白母函数,希望用题来理解吧#include#include#includeint main(){int c1[150];int c2[150];int n;while(scanf("%d",&n)!=EOF){for(int i=0;i{c1[i]=1;c2[i]=0;}for(int i=2;i原创 2015-06-02 19:28:49 · 504 阅读 · 0 评论 -
hdu1009FatMouse' Trade--水题
FatMouse prepared M pounds of cat food, ready to trade with the cats guarding the warehouse containing his favorite food, JavaBean.The warehouse has N rooms. The i-th room contains J[i] pounds of JavaBeans and requires F[i] pounds of cat food. FatMouse do原创 2015-06-02 14:19:39 · 566 阅读 · 0 评论 -
hdu1875畅通工程再续——基础并查集
简单的并查集,很好做哦相信大家都听说一个“百岛湖”的地方吧,百岛湖的居民生活在不同的小岛中,当他们想去其他的小岛时都要通过划小船来实现。现在政府决定大力发展百岛湖,发展首先要解决的问题当然是交通问题,政府决定实现百岛湖的全畅通!经过考察小组RPRush对百岛湖的情况充分了解后,决定在符合条件的小岛间建上桥,所谓符合条件,就是2个小岛之间的距离不能小于10米,也不能大于1000米。当然,为了节省资金,只要求实现任意2个小岛之间有路通即可。其中桥的价格为 100元/米。原创 2015-05-27 18:55:07 · 1722 阅读 · 0 评论 -
bhu1272小希的迷宫
我A掉的,可以来看看,有详解上次Gardon的迷宫城堡小希玩了很久(见Problem B),现在她也想设计一个迷宫让Gardon来走。但是她设计迷宫的思路不一样,首先她认为所有的通道都应该是双向连通的,就是说如果有一个通道连通了房间A和B,那么既可以通过它从房间A走到房间B,也可以通过它从房间B走到房间A,为了提高难度,小希希望任意两个房间有且仅有一条路径可以相通(除非走了回头路)。小希现在把她的设计图给你,让你帮忙判断她的设计图是否符合她的设计思路。比如下面的例子,前两个是符合条件的,但是最后一个却有两原创 2015-05-07 21:37:02 · 410 阅读 · 0 评论 -
hdu1213How Many Tables 并查集
Today is Ignatius' birthday. He invites a lot of friends. Now it's dinner time. Ignatius wants to know how many tables he needs at least. You have to notice that not all the friends know each other, and all the friends do not want to stay with strangers.原创 2015-05-07 16:59:53 · 481 阅读 · 0 评论 -
hdu1233---还是畅通工程 最小生成树(水)
某省调查乡村交通状况,得到的统计表中列出了任意两村庄间的距离。省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可),并要求铺设的公路总长度为最小。请计算最小的公路总长度。原创 2015-05-20 22:47:05 · 494 阅读 · 0 评论 -
水过一道并查集 hdu1232
并查集的简单题,基本上就是模板,原创 2015-05-08 18:29:39 · 517 阅读 · 0 评论 -
再水一道并查集,hdu1856
Mr Wang wants some boys to help him with a project. Because the project is rather complex, the more boys come, the better it will be. Of course there are certain requirements.Mr Wang selected a room big enough to hold the boys. The boy who are not been c原创 2015-05-08 19:24:43 · 471 阅读 · 0 评论 -
hdu2673 sort水题,一遍过
sort水题,一遍过原创 2015-04-12 09:30:58 · 523 阅读 · 0 评论 -
hdu1280 水水过
前m大的数Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 12659 Accepted Submission(s): 4262Problem Description还记得Gardon给小希布置的那个作业原创 2015-04-12 09:10:27 · 693 阅读 · 1 评论 -
HDU1015Safecracker——水题
=== 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. Klein safes are extremely rare; most of them, along with Klein and his factory, were destroyed in World War II. Fortunately o原创 2015-09-11 23:39:13 · 614 阅读 · 0 评论
分享