上一页 1 ··· 56 57 58 59 60 61 62 63 64 ··· 94 下一页

2012年8月20日

POJ 2195 Going Home(二分图最大权值匹配)

摘要: Going HomeTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 13981Accepted: 7156DescriptionOn a grid map there are n little men and n houses. In each unit time, every little man can move one unit step, either horizontally, or vertically, to an adjacent point. For each little man, you need to p 阅读全文

posted @ 2012-08-20 10:22 kuangbin 阅读(868) 评论(0) 推荐(0) 编辑

HDU 1151 Air Raid(最小路径覆盖)

摘要: Air RaidTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1904Accepted Submission(s): 1225Problem DescriptionConsider a town where all the streets are one-way and each street leads from one intersection to another. It is also known that starting from 阅读全文

posted @ 2012-08-20 00:11 kuangbin 阅读(1500) 评论(0) 推荐(0) 编辑

2012年8月19日

HDU 1150 Machine Schedule(最小点覆盖)

摘要: Machine ScheduleTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3444Accepted Submission(s): 1669Problem DescriptionAs we all know, machine scheduling is a very classical problem in computer science and has been studied for a very long history. Sche 阅读全文

posted @ 2012-08-19 23:42 kuangbin 阅读(3249) 评论(0) 推荐(3) 编辑

HDU 1054 Strategic Game(树形DP)

摘要: Strategic GameTime Limit: 20000/10000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2925Accepted Submission(s): 1222Problem DescriptionBob enjoys playing computer games, especially strategic games, but sometimes he cannot find the solution fast enough and then he is v 阅读全文

posted @ 2012-08-19 22:18 kuangbin 阅读(648) 评论(1) 推荐(0) 编辑

HDU 1054 Strategic Game(二分图最小点覆盖)

摘要: Strategic GameTime Limit: 20000/10000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2916Accepted Submission(s): 1217Problem DescriptionBob enjoys playing computer games, especially strategic games, but sometimes he cannot find the solution fast enough and then he is v 阅读全文

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

Kuhn-Munkres算法(二分图最大权匹配)

摘要: 二分图如果是没有权值的,求最大匹配。则是用匈牙利算法求最大匹配。如果带了权值,求最大或者最小权匹配,则必须用KM算法。 其实最大和最小权匹配都是一样的问题。只要会求最大匹配,如果要求最小权匹配,则将权值取相反数,再把结果取相反数,那么最小权匹配就求出来了。 KM算法及其难理解。。。看了几天还无头绪。 先拿上一直采用的KM算法模板,按照吉林大学的模板写的。试试了好多次感觉都没有出错。/******************************************************二分图最佳匹配 (kuhn munkras 算法 O(m*m*n)).邻接矩阵形式 。 返回最佳匹配值.. 阅读全文

posted @ 2012-08-19 16:57 kuangbin 阅读(30722) 评论(0) 推荐(2) 编辑

POJ 1847 Tram(最短路)

摘要: TramTime Limit: 1000MSMemory Limit: 30000KTotal Submissions: 7180Accepted: 2601DescriptionTram network in Zagreb consists of a number of intersections and rails connecting some of them. In every intersection there is a switch pointing to the one of the rails going out of the intersection. When the t 阅读全文

posted @ 2012-08-19 14:54 kuangbin 阅读(812) 评论(0) 推荐(0) 编辑

POJ 1811 Prime Test(大素数判断和素因子分解)

摘要: Prime TestTime Limit: 6000MSMemory Limit: 65536KTotal Submissions: 24514Accepted: 5730Case Time Limit: 4000MSDescriptionGiven a big integer number, you are required to find out whether it's a prime number.InputThe first line contains the number of test cases T (1 <= T <= 20 ), then the fol 阅读全文

posted @ 2012-08-19 14:52 kuangbin 阅读(5358) 评论(3) 推荐(2) 编辑

大素数判断和素因子分解(miller-rabin,Pollard_rho算法)

摘要: 传说中的随机算法。效率极高。可以对一个2^63的素数进行判断。可以分解比较大的数的因子。#include<stdio.h>#include<string.h>#include<stdlib.h>#include<time.h>#include<iostream>#include<algorithm>using namespace std;//****************************************************************// Miller_Rabin 算法进行素数测试//速度 阅读全文

posted @ 2012-08-19 14:45 kuangbin 阅读(13930) 评论(0) 推荐(8) 编辑

POJ 3692 Kindergarten(二分图匹配)

摘要: KindergartenTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 3866Accepted: 1832DescriptionIn a kindergarten, there are a lot of kids. All girls of the kids know each other and all boys also know each other. In addition to that, some girls and boys know each other. Now the teachers want to pi 阅读全文

posted @ 2012-08-19 01:09 kuangbin 阅读(1362) 评论(0) 推荐(0) 编辑

上一页 1 ··· 56 57 58 59 60 61 62 63 64 ··· 94 下一页

导航

JAVASCRIPT: