上一页 1 ··· 58 59 60 61 62 63 64 65 66 ··· 94 下一页

2012年8月18日

POJ 3255 Wormholes(最短路最负环)

摘要: WormholesTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 20639Accepted: 7342DescriptionWhile exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very peculiar because it is a one-way path that delivers you to its destination at a time that is BE 阅读全文

posted @ 2012-08-18 00:05 kuangbin 阅读(766) 评论(0) 推荐(0) 编辑

2012年8月17日

POJ 1860 Currency Exchange(BellmanFord算法的变形,求正环)

摘要: /*POJ 1860有多种汇币,汇币之间可以交换,这需要手续费,当你用100A币交换B币时,A到B的汇率是29.75,手续费是0.39,那么你可以得到(100 - 0.39) * 29.75 = 2963.3975 B币。问s币的金额经过交换最终得到的s币金额数能否增加货币的交换是可以重复多次的,所以我们需要找出是否存在正权回路,且最后得到的s金额是增加的怎么找正权回路呢?(正权回路:在这一回路上,顶点的权值能不断增加即能一直进行松弛)关键在于反向利用Bellman-Ford算法单源最短路径算法,因为题目可能存在负边,所以用Bellman Ford算法,原始Bellman Ford可以用来求负 阅读全文

posted @ 2012-08-17 23:06 kuangbin 阅读(3488) 评论(0) 推荐(1) 编辑

POJ 3159 Candies(差分规划+SPFA)

摘要: CandiesTime Limit: 1500MSMemory Limit: 131072KTotal Submissions: 18737Accepted: 4930DescriptionDuring the kindergarten days, flymouse was the monitor of his class. Occasionally the head-teacher brought the kids of flymouse’s class a large bag of candies and had flymouse distribute them. All the kids 阅读全文

posted @ 2012-08-17 21:31 kuangbin 阅读(3888) 评论(0) 推荐(1) 编辑

POJ 3169 Layout(差分约束+SPFA)

摘要: LayoutTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 4641Accepted: 2240DescriptionLike everyone else, cows like to stand close to their friends when queuing for feed. FJ has N (2 <= N <= 1,000) cows numbered 1..N standing along a straight line waiting for feed. The cows are standing 阅读全文

posted @ 2012-08-17 20:38 kuangbin 阅读(2515) 评论(0) 推荐(0) 编辑

HDU 4370 0 or 1(最短路)

摘要: 0 or 1Time Limit: 4000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 692Accepted Submission(s): 185Problem DescriptionGiven a n*n matrix Cij (1<=i,j<=n),We want to find a n*n matrix Xij (1<=i,j<=n),which is 0 or 1.Besides,Xij meets the following condi 阅读全文

posted @ 2012-08-17 19:20 kuangbin 阅读(3052) 评论(0) 推荐(1) 编辑

十个利用矩阵乘法解决的经典题目(Maxtrix67)(转)

摘要: 好像目前还没有这方面题目的总结。这几天连续看到四个问这类题目的人,今天在这里简单写一下。这里我们不介绍其它有关矩阵的知识,只介绍矩阵乘法和相关性质。不要以为数学中的矩阵也是黑色屏幕上不断变化的绿色字符。在数学中,一个矩阵说穿了就是一个二维数组。一个n行m列的矩阵可以乘以一个m行p列的矩阵,得到的结果是一个n行p列的矩阵,其中的第i行第j列位置上的数等于前一个矩阵第i行上的m个数与后一个矩阵第j列上的m个数对应相乘后所有m个乘积的和。比如,下面的算式表示一个2行2列的矩阵乘以2行3列的矩阵,其结果是一个2行3列的矩阵。其中,结果的那个4等于2*2+0*1: 下面的算式则是一个1 x 3的矩阵乘以 阅读全文

posted @ 2012-08-17 01:04 kuangbin 阅读(1366) 评论(0) 推荐(0) 编辑

Developing School's Contest 6 (更新中)

摘要: Developing School's Contest 6 说明:此报告只是个人的总结,非官方报告。此中有些想法也是自己一孔之见,有不对的地方,望不吝赐教! 尚未完成,还在更新中··········kuangbinB.寻找最大值Time Limit : 3000/1000ms (Java/Other)Memory Limit : 65535/32768K (Java/Other)Total Submission(s) : 36Accepted Submission(s) : 9Font: 阅读全文

posted @ 2012-08-17 00:41 kuangbin 阅读(363) 评论(0) 推荐(1) 编辑

2012年8月16日

HDU 3473 Minimum Sum(划分树,求中位数,小于中位数的和与大于中位数的和)

摘要: Minimum SumTime Limit: 16000/8000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1533Accepted Submission(s): 345Problem DescriptionYou are given N positive integers, denoted as x0, x1 ... xN-1. Then give you some intervals [l, r]. For each interval, you need to find a 阅读全文

posted @ 2012-08-16 01:48 kuangbin 阅读(833) 评论(0) 推荐(0) 编辑

2012年8月15日

HDU 1542 Atlantis(矩形面积并)

摘要: AtlantisTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3469Accepted Submission(s): 1549Problem DescriptionThere are several ancient Greek texts that contain descriptions of the fabled island Atlantis. Some of these texts even include maps of parts 阅读全文

posted @ 2012-08-15 22:00 kuangbin 阅读(1234) 评论(0) 推荐(0) 编辑

HDU 1255 覆盖的面积(矩形面积交)

摘要: 覆盖的面积Time Limit: 10000/5000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2304Accepted Submission(s): 1136Problem Description给定平面上若干矩形,求出被这些矩形覆盖过至少两次的区域的面积.Input输入数据的第一行是一个正整数T(1<=T<=100),代表测试数据的数量.每个测试数据的第一行是一个正整数N(1<=N<=1000),代表矩形的数量,然后是N行数据,每一行包含四个浮点数,代 阅读全文

posted @ 2012-08-15 21:59 kuangbin 阅读(3876) 评论(0) 推荐(0) 编辑

上一页 1 ··· 58 59 60 61 62 63 64 65 66 ··· 94 下一页

导航

JAVASCRIPT: