摘要: 先上题目:1213. Cockroaches!Time limit: 1.0 secondMemory limit: 64 MB It's well-known that the most tenacious of life species on the Earth are cockroaches. They live everywhere if only there in food. And as far as they are unpretentious in food you can find them absolutely everywhere. A little Lyosha 阅读全文
posted @ 2014-02-24 17:01 海拉鲁的林克 阅读(205) 评论(0) 推荐(0) 编辑
摘要: 先上题目:1209. 1, 10, 100, 1000...Time limit: 1.0 secondMemory limit: 64 MBLet's consider an infinite sequence of digits constructed of ascending powers of 10 written one after another. Here is the beginning of the sequence: 110100100010000… You are to find out what digit is located at the definite 阅读全文
posted @ 2014-02-24 16:49 海拉鲁的林克 阅读(445) 评论(0) 推荐(0) 编辑
摘要: 先上题目:In ActionTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3352Accepted Submission(s): 1068Problem DescriptionSince 1945, when the first nuclear bomb was exploded by the Manhattan Project team in the US, the number of nuclear weapons have soared 阅读全文
posted @ 2014-02-23 00:10 海拉鲁的林克 阅读(251) 评论(0) 推荐(0) 编辑
摘要: 先上题目:NecklaceTime Limit: 15000/5000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2330Accepted Submission(s): 831Problem DescriptionMery has a beautiful necklace. The necklace is made up of N magic balls. Each ball has a beautiful value. The balls with the same beauti 阅读全文
posted @ 2014-02-22 21:54 海拉鲁的林克 阅读(248) 评论(0) 推荐(0) 编辑
摘要: 先上题目:Happy GirlsTime Limit: 6000/3000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1356Accepted Submission(s): 233Problem DescriptionThese days, Hunan TV host the big concert – Happy Girls.Long1 and xinxin like it very much, they even use their cellphones to suppose 阅读全文
posted @ 2014-02-22 20:08 海拉鲁的林克 阅读(419) 评论(0) 推荐(0) 编辑
摘要: 先上题目:To The MaxTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7177Accepted Submission(s): 3470Problem 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 阅读全文
posted @ 2014-02-22 00:29 海拉鲁的林克 阅读(445) 评论(0) 推荐(0) 编辑
摘要: 先上题目:ComputerTime Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2581Accepted Submission(s): 1327Problem DescriptionA school bought the first computer some time ago(so this computer's id is 1). During the recent years the school bought N-1 new comp 阅读全文
posted @ 2014-02-19 15:12 海拉鲁的林克 阅读(446) 评论(0) 推荐(0) 编辑
摘要: 先上题目:Anniversary partyTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3859Accepted Submission(s): 1798Problem DescriptionThere is going to be a party to celebrate the 80-th Anniversary of the Ural State University. The University has a hierarchical 阅读全文
posted @ 2014-02-19 14:49 海拉鲁的林克 阅读(369) 评论(0) 推荐(0) 编辑
摘要: 先上题目:Watch The MovieTime Limit: 3000/1000 MS (Java/Others)Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 4722Accepted Submission(s): 1497Problem DescriptionNew semester is coming, and DuoDuo has to go to school tomorrow. She decides to have fun tonight and will be very busy after toni 阅读全文
posted @ 2014-01-22 16:48 海拉鲁的林克 阅读(340) 评论(0) 推荐(0) 编辑
摘要: 先上题目饭卡Time Limit: 5000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 8404Accepted Submission(s): 2861Problem Description电子科大本部食堂的饭卡有一种很诡异的设计,即在购买之前判断余额。如果购买一个商品之前,卡上的剩余金额大于或等于5元,就一定可以购买成功(即使购买后卡上余额为负),否则无法购买(即使金额足够)。所以大家都希望尽量使卡上的余额最少。某天,食堂中有n种菜出售,每种菜可购买一次。已知每种菜的价 阅读全文
posted @ 2014-01-21 23:21 海拉鲁的林克 阅读(409) 评论(0) 推荐(0) 编辑
摘要: 先上题目:Piggy-BankTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 9321Accepted Submission(s): 4700Problem DescriptionBefore ACM can do anything, a budget must be prepared and the necessary financial support obtained. The main income for this action co 阅读全文
posted @ 2014-01-18 16:46 海拉鲁的林克 阅读(245) 评论(0) 推荐(0) 编辑
摘要: 先上题目:Bone CollectorTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 23533Accepted Submission(s): 9535Problem DescriptionMany years ago , in Teddy’s hometown there was a man who was called “Bone Collector”. This man like to collect varies of bones , 阅读全文
posted @ 2014-01-17 19:15 海拉鲁的林克 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 先上题目:最大连续子序列Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 16518Accepted Submission(s): 7251Problem Description给定K个整数的序列{ N1, N2, ..., NK },其任意连续子序列可表示为{ Ni, Ni+1, ...,Nj },其中 1 2 #include 3 #define MAX 10010 4 using namespace std; 5 6 int a[MA... 阅读全文
posted @ 2014-01-16 19:16 海拉鲁的林克 阅读(341) 评论(0) 推荐(0) 编辑
摘要: 先上题目:Common SubsequenceTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 19679Accepted Submission(s): 8389Problem DescriptionA subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = an. 阅读全文
posted @ 2014-01-16 16:42 海拉鲁的林克 阅读(221) 评论(0) 推荐(0) 编辑
摘要: 先上题目:A -Tourist ProblemTime Limit:1000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusPracticeCodeForces 340CDescriptionIahub is a big fan of tourists. He wants to become a tourist himself, so he planned a trip. There arendestinations on a straight road that Iahub wants to visit. 阅读全文
posted @ 2014-01-16 12:05 海拉鲁的林克 阅读(333) 评论(0) 推荐(0) 编辑
摘要: 先上题目:Super Jumping! Jumping! Jumping!Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 18956Accepted Submission(s): 8136Problem DescriptionNowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU. Maybe you are 阅读全文
posted @ 2014-01-16 11:15 海拉鲁的林克 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 先上题目:Humble NumbersTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 14364Accepted Submission(s): 6236Problem 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, 1 阅读全文
posted @ 2014-01-11 21:20 海拉鲁的林克 阅读(232) 评论(0) 推荐(0) 编辑
摘要: 先上题目:免费馅饼Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 21365Accepted Submission(s): 7208Problem Description都说天上不会掉馅饼,但有一天gameboy正走在回家的小径上,忽然天上掉下大把大把的馅饼。说来gameboy的人品实在是太好了,这馅饼别处都不掉,就掉落在他身旁的10米范围内。馅饼如果掉在了地上当然就不能吃了,所以gameboy马上卸下身上的背包去接。但由于小径两侧都不能站人, 阅读全文
posted @ 2014-01-11 21:00 海拉鲁的林克 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 先上题目:蜘蛛牌Time Limit: 10000/5000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1303Accepted Submission(s): 512Problem Description蜘蛛牌是windows xp操作系统自带的一款纸牌游戏,游戏规则是这样的:只能将牌拖到比她大一的牌上面(A最小,K最大),如果拖动的牌上有按顺序排好的牌时,那么这些牌也跟着一起移动,游戏的目的是将所有的牌按同一花色从小到大排好,为了简单起见,我们的游戏只有同一花色的10张牌,从A到 阅读全文
posted @ 2014-01-11 20:52 海拉鲁的林克 阅读(226) 评论(0) 推荐(0) 编辑
摘要: 太久没做题了,手都生了不少,所以从比较简单的题目开始做起。先上题目 Max SumTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 123917Accepted Submission(s): 28659Problem DescriptionGiven a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For... 阅读全文
posted @ 2014-01-11 20:42 海拉鲁的林克 阅读(291) 评论(0) 推荐(0) 编辑
摘要: 原文地址:http://hi.baidu.com/jiajiajava/item/1a18431b322fc011e2f986efJTable是Swing编程中很常用的控件,这里总结了一些常用方法以备查阅.一.创建表格控件的各种方式:1) 调用无参构造函数.JTable table = new JT... 阅读全文
posted @ 2013-12-12 20:47 海拉鲁的林克 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 出处:http://www.cnblogs.com/grenet/p/3163550.html在“跳跃的舞者,舞蹈链(Dancing Links)算法——求解精确覆盖问题”一文中介绍了舞蹈链(Dancing Links)算法求解精确覆盖问题。本文介绍该算法的实际运用,利用舞蹈链(Dancing Links)算法求解数独在前文中可知,舞蹈链(Dancing Links)算法在求解精确覆盖问题时效率惊人。那利用舞蹈链(Dancing Links)算法求解数独问题,实际上就是下面一个流程1、把数独问题转换为精确覆盖问题2、设计出数据矩阵3、用舞蹈链(Dancing Links)算法求解该精确覆盖问题 阅读全文
posted @ 2013-10-13 13:27 海拉鲁的林克 阅读(422) 评论(0) 推荐(0) 编辑
摘要: 出处:http://www.cnblogs.com/grenet/p/3145800.html精确覆盖问题的定义:给定一个由0-1组成的矩阵,是否能找到一个行的集合,使得集合中每一列都恰好包含一个1例如:如下的矩阵就包含了这样一个集合(第1、4、5行)如何利用给定的矩阵求出相应的行的集合呢?我们采用回溯法矩阵1:先假定选择第1行,如下所示:如上图中所示,红色的那行是选中的一行,这一行中有3个1,分别是第3、5、6列。由于这3列已经包含了1,故,把这三列往下标示,图中的蓝色部分。蓝色部分包含3个1,分别在2行中,把这2行用紫色标示出来根据定义,同一列的1只能有1个,故紫色的两行,和红色的一行的1 阅读全文
posted @ 2013-10-13 13:22 海拉鲁的林克 阅读(264) 评论(0) 推荐(0) 编辑
摘要: 题目:The Shortest PathTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1827Accepted Submission(s): 589Problem DescriptionThere are N cities in the country. Each city is represent by a matrix size of M*M. If city A, B and C satisfy that A*B = C, we say 阅读全文
posted @ 2013-09-06 19:03 海拉鲁的林克 阅读(227) 评论(0) 推荐(0) 编辑
摘要: 题目:EinbahnstrasseTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1548Accepted Submission(s): 428Problem DescriptionEinbahnstra e (German for a one-way street) is a street on which vehicles should only move in one direction. One reason for having .. 阅读全文
posted @ 2013-09-06 16:19 海拉鲁的林克 阅读(261) 评论(0) 推荐(0) 编辑
摘要: 出处:http://blog.csdn.net/shahdza/article/details/7779273最短路【HDU】1548 A strange lift基础最短路(或bfs)★2544 最短路基础最短路★3790 最短路径问题基础最短路★2066 一个人的旅行基础最短路(多源多汇,可以建立超级源点和终点)★2112 HDU Today基础最短路★1874 畅通工程续基础最短路★1217 Arbitrage 货币交换 Floyd (或者 Bellman-Ford 判环)★1245 Saving James Bond计算几何+最短路★1317 XYZZY Bellma... 阅读全文
posted @ 2013-09-06 12:51 海拉鲁的林克 阅读(279) 评论(0) 推荐(0) 编辑
摘要: 题目:Free DIY TourTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2978Accepted Submission(s): 982Problem DescriptionWeiwei is a software engineer of ShiningSoft. He has just excellently fulfilled a software project with his fellow workers. His boss i 阅读全文
posted @ 2013-09-05 22:24 海拉鲁的林克 阅读(271) 评论(0) 推荐(0) 编辑
摘要: 出处:http://www.cnblogs.com/void/archive/2011/08/26/2153928.html作者对于差分约束的一点理解,虽然暂时感觉讲得还不是很详细,不过我也是刚开始接触这东西,也不能这样说别人= =,然转过来看一下先。-------------------------------------------------------------我是分界线-------------------------------------------------------------一直不知道差分约束是什么类型题目,最近在写最短路问题就顺带看了下,原来就是给出一些形如x-y, 阅读全文
posted @ 2013-09-05 20:58 海拉鲁的林克 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 题目:幸福列车Time Limit: 20000/10000 MS (Java/Others)Memory Limit: 131070/65535 K (Java/Others)Total Submission(s): 1525Accepted Submission(s): 421Problem Description一批幸福的列车即将从杭州驶向幸福的终点站——温州,身为总列车长的linle有一些奇怪的癖好。他会记录下全部乘客的名字(name)和他们的人品值(RP),根据这些将他们排序,并不时地从某辆列车里踢出人品最不好(RP值最低)的一个人,当两个人人品一样不好时,他就会踢出名字难听的人(l 阅读全文
posted @ 2013-09-04 21:37 海拉鲁的林克 阅读(440) 评论(0) 推荐(0) 编辑
摘要: 题目:HDU TodayTime Limit: 15000/5000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 11126Accepted Submission(s): 2604Problem Description经过锦囊相助,海东集团终于度过了危机,从此,HDU的发展就一直顺风顺水,到了2050年,集团已经相当规模了,据说进入了钱江肉丝经济开发区500强。这时候,XHD夫妇也退居了二线,并在风景秀美的诸暨市浬浦镇陶姚村买了个房子,开始安度晚年了。这样住了一段时间,徐总对当地的交 阅读全文
posted @ 2013-09-04 19:12 海拉鲁的林克 阅读(520) 评论(0) 推荐(0) 编辑