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

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

ACM POJ1151 (HDU 1542) Atlantis(矩形面积并,线段树+离散化+扫描线)
摘要:AtlantisTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 9693Accepted: 3791DescriptionThere are several ancient Greek texts that contain descriptions of the fabled island Atlantis. Some of these texts even include maps of parts of the island. But unfortunately, these maps describe different 阅读全文

posted @ 2011-08-16 13:57 kuangbin 阅读(4922) 评论(0) 推荐(1) 编辑

ACM HDU 1166 敌兵布阵(简单的线段树)
摘要:敌兵布阵Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 8754Accepted Submission(s): 3647Problem DescriptionC国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的一清二楚,每个工兵营地的人数都 阅读全文

posted @ 2011-08-15 20:48 kuangbin 阅读(2134) 评论(1) 推荐(1) 编辑

ACM HDU 3910 Liang Guo Sha(数学题,读懂题目)
摘要:Liang Guo ShaTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 214Accepted Submission(s): 162Problem DescriptionMaybe you know “San Guo Sha”, but I guess you didn’t hear the game: “Liang Guo Sha”!Let me introduce this game to you. Unlike “San Guo Sha 阅读全文

posted @ 2011-08-13 13:49 kuangbin 阅读(1434) 评论(0) 推荐(0) 编辑

ACM HDU 1177 "Accepted today?"(简单题)
摘要:"Accepted today?"Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1476Accepted Submission(s): 649Problem DescriptionDo you remember a sentence "Accepted today?" Yes, the sentence is mentioned frequently in lcy's course " 阅读全文

posted @ 2011-08-12 17:03 kuangbin 阅读(920) 评论(0) 推荐(0) 编辑

ACM HDU 1174 爆头(数学题,求空间点到直线的距离,用叉积)
摘要:爆头Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 752Accepted Submission(s): 275Problem Descriptiongameboy是一个CS高手,他最喜欢的就是扮演警察,手持M4爆土匪的头。也许这里有人没玩过CS,有必要介绍一下“爆头”这个术语:所谓爆头,就是子弹直接命中对方的头部,以秒杀敌人。现在用一个三维的直角坐标系来描述游戏中的三维空间(水平面为xoy平面,z轴正方向是上方)。假设游戏中角色的头是一个标准 阅读全文

posted @ 2011-08-12 14:42 kuangbin 阅读(1558) 评论(1) 推荐(0) 编辑

ACM HDU 1173 采矿(很爽的水题)
摘要:采矿Time Limit: 10000/5000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 694Accepted Submission(s): 385Special JudgeProblem Description某天gameboy玩魔兽RPG。有一个任务是在一个富含金矿的圆形小岛上建一个基地,以最快的速度采集完这个小岛上的所有金矿。这个小岛上有n(0<n<1000000)个金矿,每个金矿的矿藏量是相等的。而且这个小岛的地势非常平坦,所以基地可以建在小岛的任何位置,每 阅读全文

posted @ 2011-08-12 13:29 kuangbin 阅读(1180) 评论(1) 推荐(0) 编辑

ACM HDU 1172 猜数字 (枚举法)
摘要:猜数字Time Limit: 20000/10000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 852Accepted Submission(s): 481Problem Description猜数字游戏是gameboy最喜欢的游戏之一。游戏的规则是这样的:计算机随机产生一个四位数,然后玩家猜这个四位数是什么。每猜一个数,计算机都会告诉玩家猜对几个数字,其中有几个数字在正确的位置上。比如计算机随机产生的数字为1122。如果玩家猜1234,因为1,2这两个数字同时存在于这两个数中,而 阅读全文

posted @ 2011-08-12 13:13 kuangbin 阅读(3228) 评论(0) 推荐(0) 编辑

ACM HDU 2389 Rain on your Parade(二分匹配 Hopcroft-Carp的算法)
摘要:Rain on your ParadeTime Limit: 6000/3000 MS (Java/Others)Memory Limit: 655350/165535 K (Java/Others)Total Submission(s): 1310Accepted Submission(s): 373Problem DescriptionYou’re giving a party in the garden of your villa by the sea. The party is a huge success, and everyone is here. It’s a warm, sun 阅读全文

posted @ 2011-08-12 11:18 kuangbin 阅读(801) 评论(0) 推荐(0) 编辑

ACM HDU 2819 Swap (二分图匹配,记录过程)
摘要:SwapTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 459Accepted Submission(s): 129Special JudgeProblem DescriptionGiven an N*N matrix with each entry equal to 0 or 1. You can swap any two rows or any two columns. Can you find a way to make all the 阅读全文

posted @ 2011-08-11 14:47 kuangbin 阅读(1191) 评论(0) 推荐(1) 编辑

ACM HDU 1281 棋盘游戏 (二分匹配,方格的建图,找关键点)
摘要:棋盘游戏Time Limit : 2000/1000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 5Accepted Submission(s) : 4Font: Times New Roman | Verdana | GeorgiaFont Size: ← →Problem Description小希和Gardon在玩一个游戏:对一个N*M的棋盘,在格子里放尽量多的一些国际象棋里面的“车”,并且使得他们不能互相攻击,这当然很简单,但是Gardon限制了只有某些格子才可以放,小希还是很轻 阅读全文

posted @ 2011-08-10 22:16 kuangbin 阅读(894) 评论(0) 推荐(0) 编辑

ACM HDU 1083 Courses(二分匹配,最大匹配)
摘要:题目大意:有p个课程和n个学生,每个学生可以自由选择课程(0到p个),现在要建立一个委员会,问是否能找到每个课程都有学生代表的集合,一个学生只能代表一个课程题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1083简单的二分匹配,用匈牙利算法就可以,主要是练习模板,固定方法解题!程序:#include<stdio.h>#include<iostream>using namespace std;#define MAXN 305int g[MAXN][MAXN];int uN,vN;int linker[MAXN];bool us 阅读全文

posted @ 2011-08-10 20:57 kuangbin 阅读(728) 评论(0) 推荐(0) 编辑

ACM HDU 2444 The Accomodation of Students(判断是否为二部图,然后求最大匹配)
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2444题意: 有n个学生,有m对人是认识的,每一对认识的人能分到一间房,问能否把n个学生分成两部分,每部分内的学生互不认识,而两部分之间的学生认识。如果可以分成两部分,就算出房间最多需要多少间,否则就输出No。分析:先是要判断是否为二部图,然后求最大匹配。这里的程序hungary()用vector实现/*HDU 2444 The Accomodation of Students*/#include<iostream>#include<string.h>#include< 阅读全文

posted @ 2011-08-10 16:51 kuangbin 阅读(718) 评论(0) 推荐(1) 编辑

HDU 1045 Fire Net(建模,用二分匹配)
摘要:Fire NetTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2349Accepted Submission(s): 1342Problem 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 st 阅读全文

posted @ 2011-08-09 21:34 kuangbin 阅读(3317) 评论(0) 推荐(0) 编辑

ACM HDU 2063 过山车(简单的二分匹配)
摘要:过山车Time Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2978Accepted Submission(s): 1222Problem DescriptionRPG girls今天和大家一起去游乐场玩,终于可以坐上梦寐以求的过山车了。可是,过山车的每一排只有两个座位,而且还有条不成文的规矩,就是每个女生必须找个个男生做partner和她同坐。但是,每个女孩都有各自的想法,举个例子把,Rabbit只愿意和XHD或PQK做partner,Grass只 阅读全文

posted @ 2011-08-08 16:55 kuangbin 阅读(726) 评论(0) 推荐(0) 编辑

ACM HDU 3466 Proud Merchants(某种顺序下的背包)
摘要:Proud MerchantsTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 131072/65536 K (Java/Others)Total Submission(s): 925Accepted Submission(s): 368Problem DescriptionRecently, iSea went to an ancient country. For such a long time, it was the most wealthy and powerful kingdom in the world. As a result 阅读全文

posted @ 2011-08-08 16:16 kuangbin 阅读(437) 评论(1) 推荐(0) 编辑

ACM HDU 3460 Ancient Printer(简单题)
摘要:Ancient PrinterTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 131072/65536 K (Java/Others)Total Submission(s): 704Accepted Submission(s): 309Problem DescriptionThe contest is beginning! While preparing the contest, iSea wanted to print the teams' names separately on a single paper.Unfortuna 阅读全文

posted @ 2011-08-08 12:51 kuangbin 阅读(906) 评论(0) 推荐(0) 编辑

ACM HDU 1283 最简单的计算机(简单水题)
摘要:最简单的计算机Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1781Accepted Submission(s): 1054Problem Description一个名叫是PigHeadThree的研究组织设计了一台实验用的计算机,命名为PpMm。PpMm只能执行简单的六种命令A,B,C,D,E,F;只有二个内存M1,M2;三个寄存器R1,R2,R3。六种命令的含义如下:命令A:将内存M1的数据装到寄存器R1中;命令B:将内存M2的数据装到寄 阅读全文

posted @ 2011-08-06 14:42 kuangbin 阅读(1937) 评论(0) 推荐(0) 编辑

ACM HDU 1282 回文数猜想(简单水题)
摘要:回文数猜想Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1524Accepted Submission(s): 945Problem Description一个正整数,如果从左向右读(称之为正序数)和从右向左读(称之为倒序数)是一样的,这样的数就叫回文数。任取一个正整数,如果不是回文数,将该数与他的倒序数相加,若其和不是回文数,则重复上述步骤,一直到获得回文数为止。例如:68变成154(68+86),再变成605(154+451),最后变成1 阅读全文

posted @ 2011-08-06 14:32 kuangbin 阅读(3524) 评论(0) 推荐(0) 编辑

ACM HDU 1279 验证角谷猜想(简单水题)
摘要:验证角谷猜想Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2209Accepted Submission(s): 1137Problem Description数论中有许多猜想尚未解决,其中有一个被称为“角谷猜想”的问题,该问题在五、六十年代的美国多个著名高校中曾风行一时,这个问题是这样描述的:任何一个大于一的自然数,如果是奇数,则乘以三再加一;如果是偶数,则除以二;得出的结果继续按照前面的规则进行运算,最后必定得到一。现在请你编写一个程序验 阅读全文

posted @ 2011-08-06 14:18 kuangbin 阅读(2161) 评论(0) 推荐(0) 编辑

HDU 1266 Reverse Number (很简单的水题)
摘要:Reverse NumberTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2047Accepted Submission(s): 926Problem DescriptionWelcome to 2006'4 computer college programming contest!Specially, I give my best regards to all freshmen! You are the future of HDU 阅读全文

posted @ 2011-08-06 14:08 kuangbin 阅读(806) 评论(0) 推荐(0) 编辑

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

导航

JAVASCRIPT: