自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(252)
  • 收藏
  • 关注

原创 POJ 2001 字典树

<br />题目连接:http://poj.org/problem?id=2001<br />记录每个字母出现的次数就可以了~<br /> <br />Source CodeProblem:2001 User:bingshenMemory: 1220K Time: 32MSLanguage: C++ Result:AcceptedSource Code#include<stdio.h>#include<string.h>structnode{int num;int data[26];voidinit();}

2011-04-05 22:47:00 871 1

原创 POJ 3186 动态规划

题目链接:http://poj.org/problem?id=3186题意:给定n个数每次可以从头或者尾取出数据于是按取出来得顺序,就可以排成一个数列,假设这个数列为a1,a2,a3,a4.......an现在我们假设按照取出来的顺序有一个权值w=a1*1+a2*2+a3*3+....an*n现在需要编程求出,如何控制取数的顺序,让w的值最大 思路:首先我以

2011-03-31 14:11:00 2670

原创 POJ 2236 并查集

Wireless NetworkTime Limit: 10000MS Memory Limit: 65536KTotal Submissions: 9916 Accepted: 4185<br />DescriptionAn earthquake takes place in Southeast Asia. The ACM (Asia Cooperated Medical team) have set up a wireless network with the lap computers, but an

2011-03-28 15:51:00 5231 3

原创 POJ 1661 SPFA过的。。。感谢各种牛贴出来的数据。。。

Help JimmyTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 6228 Accepted: 1939<br />Description"Help Jimmy" 是在下图所示的场景上完成的游戏。 <br /><br />场景中包括多个长度和高度各不相同的平台。地面是最低的平台,高度为零,长度无限。 <br /><br />Jimmy老鼠在时刻0从高于所有平台的某处开始下落,它的下落速度始终为1米/秒。当Jimmy落到某个平台上时,游戏者

2011-03-27 17:37:00 1705

原创 POJ 1080 动态规划(LCS变种)

Human Gene FunctionsTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 10904 Accepted: 6015<br />DescriptionIt is well known that a human gene can be considered as a sequence, consisting of four nucleotides, which are simply denoted by four letters,

2011-03-23 10:28:00 1194

原创 POJ 3258 二分算法

<br />题目链接:http://poj.org/problem?id=3258<br /> <br />题意:有一条河流,上面原来有n个石头,FJ的cow可以从这些石头上跳过去,现在FJ想训练他的cow的跳跃能力,于是乎想移去其中的m个石头,而且他要求,去掉这m个石头后,石头与石头之间的最小值必须最大。<br /> <br />思路:二分答案,然后验证当前答案下最少需要移去的石头数量<br /> <br />my ugly code:<br />Source Code<br />Problem:3258

2011-03-18 13:45:00 1065 1

原创 POJ 1089 贪心算法

IntervalsTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 5434 Accepted: 2133<br />DescriptionThere is given the series of n closed intervals [ai; bi], where i=1,2,...,n. The sum of those intervals may be represented as a sum of closed pairwise no

2011-03-16 09:57:00 1252

原创 POJ 2021 BFS+大量STL。。

Relative RelativesTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 2806 Accepted: 1210<br />DescriptionToday is Ted's 100th birthda

2011-03-13 16:17:00 1441

原创 POJ 3468 线段树,OIer杨弋出的题目。。膜拜中。。。orz...

A Simple Problem with IntegersTime Limit: 5000MS Memory Limit: 131072KTotal Submissions: 17755 Accepted: 4605C

2011-03-12 20:38:00 2189

原创 POJ 3264 线段树

Balanced LineupTime Limit: 5000MS Memory Limit: 65536KTotal Submissions: 16163 Accepted: 7468Case Time Limit: 2000MSDescriptionFor the daily milking, Farmer John's N cows (1 ≤ N ≤ 50,000) always line up in the same order. One day Farmer John decides to org

2011-03-11 22:34:00 3448

原创 POJ 3697 BFS暴力

USTC campus networkTime Limit: 4000MS Memory Limit: 65536KTotal Submissions: 3316 Accepted: 1023<br />Description<br />USTC campus network is a huge network. There is a bi-directional link between every pair of computers in the network. One of the computer

2011-03-10 19:02:00 1743

原创 POJ 3683 2-sat问题,不过要输出路径用topsort

Priest John's Busiest DayTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 3985 Accepted: 1394 Special Judge<br />Description<br />John is the only priest in his town. September 1st is the John's busiest day in a year because there is an old legend

2011-02-24 20:25:00 1119

原创 POJ 3207 2-sat

Ikki's Story IV - Panda's TrickTime Limit: 1000MS Memory Limit: 131072KTotal Submissions: 3680 Accepted: 1330

2011-02-23 16:30:00 1142

原创 POJ 2112 floyd+二分答案+网络流

Optimal MilkingTime Limit: 2000MS Memory Limit: 30000KTotal Submissions: 4895 Accepted: 1874Case Time Limit: 1000MS<br />DescriptionFJ has moved his K (1 <= K <= 30) milking machines out into the cow pastures among the C (1 <= C <= 200) cows. A set of path

2011-02-22 17:33:00 1119

原创 POJ 1459 网络流算法(EK)

Power NetworkTime Limit: 2000MS Memory Limit: 32768KTotal Submissions: 12578 Accepted: 6846<br />DescriptionA power network consists of nodes (power stations, consumers and dispatchers) connected by power transport lines. A node u may be supplied with an a

2011-02-20 21:46:00 1391

原创 POJ 2631 最长路搜索,BFS

Roads in the NorthTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 1352 Accepted: 666<br />DescriptionBuilding and maintaining roads among communities in the far North is an expensive business. With this in mind, the roads are build such that ther

2011-02-19 20:38:00 1559

原创 POJ 2976 参数搜索

Dropping testsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 3042 Accepted: 964DescriptionI

2011-02-19 19:01:00 1556

原创 POJ 2613 组合数的比(好吧,我承认我又写复杂了)

Choose and divideTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 3381 Accepted: 1097Description

2011-02-17 01:42:00 1219

原创 POJ 1904 强连通

King's QuestTime Limit: 15000MS Memory Limit: 65536KTotal Submissions: 3719 Accepted: 1251Case Time Limit: 2000MS<br />DescriptionOnce upon a time there lived a king and he had N sons. And there were N beautiful girls in the kingdom and the king knew about

2011-02-15 17:53:00 1262

原创 POJ 2377 最大生成树 prim实现

Bad CowtractorsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 6904 Accepted: 3008<br />DescriptionBessie has been hired to build

2011-02-14 14:46:00 6002

原创 POJ 3304 计算几何

SegmentsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 3703 Accepted: 1026<br />Description<br />Given n segments in the two dimensional space, write a program, which determines if there exists a line such that after projecting these segments on

2011-02-11 02:57:00 1373

原创 POJ 3660 floyd算法统计无关点个数

Cow ContestTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 3613 Accepted: 1911DescriptionN (1 ≤ N ≤ 100) cows, conveniently numbered 1..N, are partici

2011-02-11 02:54:00 1030 2

原创 POJ 1068 括号模拟

ParencodingsTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 11191 Accepted: 6590<br />DescriptionLet S = s1 s2...s2n be a well-formed string of parentheses. S can be encoded in two different ways: <br />q By an integer sequence P = p1 p2...pn whe

2011-02-10 00:32:00 2839

原创 POJ 2955 DP动态规划

BracketsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 1659 Accepted: 831DescriptionWe give

2011-02-06 23:45:00 1551 1

原创 POJ 1789 最小生成树问题

Truck HistoryTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 8416 Accepted: 3027<br />DescriptionAdvanced Cargo Movement, Ltd. uses trucks of different types. Some trucks are used for vegetable delivery, other for furniture, or for bricks. The co

2011-02-06 20:14:00 1920

原创 POJ 1142 暴力!

Smith NumbersTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 8209 Accepted: 2867<br />DescriptionWhile skimming his phone directory in 1982, Albert Wilansky, a mathematician of Lehigh University,noticed that the telephone number of his brother-in

2011-01-30 20:37:00 1358

原创 TOJ 比赛C题 Visiting Cows (TJU 2011 Exercise Contest 04)

C.   Visiting CowsTime Limit: 1.0 Seconds   Memory Limit: 65536K<br />Total Runs: 61   Accepted Runs: 21    Multiple test files<br /><br /><br />Description<br />After many weeks of hard work, Bessie is finally getting a vacation! Being the most social cow

2011-01-30 16:48:00 1044

原创 POJ 1411 数论+优化

Calling Extraterrestrial Intelligence AgainTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 9219 Accepted: 3669<br />DescriptionA m

2011-01-30 16:46:00 1281

原创 POJ 2803 字符串识别

Defining MomentTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 1341 Accepted: 603<br />DescriptionAs a homework assignment, you have been tasked with creating a program that provides the meanings for many different words. As you dislike the idea

2011-01-23 12:29:00 1330

原创 POJ 2584 最大匹配。匈牙利算法

T-Shirt GumboTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 1437 Accepted: 635<br />DescriptionBoudreaux and Thibodeaux are student volunteers for this year's ACM South Central Region's programming contest. One of their duties is to distribute t

2011-01-16 00:48:00 1577

原创 POJ 3565 KM算法

AntsTime Limit: 5000MS Memory Limit: 65536KTotal Submissions: 1842 Accepted: 527 Special Judge<br />Description<br />Young naturalist Bill s

2011-01-15 23:38:00 2250

原创 POJ 3298 递推,DP

AntimonotonicityTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 2428 Accepted: 995<br />Description<br />I have a sequence Fred of length n comprised of integers between 1 and n inclusive. The elements of Fred are pairwise distinct. I want to fin

2011-01-14 23:55:00 1136

原创 POJ 1486 二分图的最大匹配(强化)

Sorting SlidesTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 1801 Accepted: 648<br />DescriptionProfessor Clumsey is going to give an important talk this afternoon. Unfortunately, he is not a very tidy person and has put all his transparencies o

2011-01-14 21:57:00 1078

原创 USACO firday 模拟

Friday the Thirteenth<br /><br />Is Friday the 13th really an unusual event? <br />That is, does the 13th of the month land on a Friday less often than on any other day of the week? To answer this question, write a program that will compute the frequency t

2011-01-11 17:19:00 1111

原创 POJ 2446 最大匹配算法

ChessboardTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 6719 Accepted: 2103<br />DescriptionAlice and Bob often play games on chessboard. One day, Alice draws a board with size M * N. She wants Bob to use a lot of cards with size 1 * 2 to cover

2011-01-10 19:28:00 1113

原创 USACO gift1

Greedy Gift Givers<br />A group of NP (2 ≤ NP ≤ 10) uniquely named friends has decided to exchange gifts of money. Each of these friends might or might not give some money to any or all of the other friends. Likewise, each friend might or might not receive

2011-01-08 14:49:00 912

原创 USACO ride

Your Ride Is Here<br />It is a well-known fact that behind every good comet is a UFO. These UFOs often come to collect loyal supporters from here on Earth. Unfortunately, they only have room to pick up one group of followers on each trip. They do, however,

2011-01-08 14:46:00 653

原创 POJ 1833 STL容器运用

排列Time Limit: 1000MS Memory Limit: 30000KTotal Submissions: 9466 Accepted: 4183<br />Description题目描述: <br />大家知道,给出正整数n,则1到n这n个数可以构成n!种排列,把这些排列按照从小到大的顺序(字典顺序)列出,如n=3时,列出1 2 3,1 3 2,2 1 3,2 3 1,3 1 2,3 2 1六个排列。 <br /><br />任务描述: <br />给出某个排列,求出这个排列的下k个排列,如果

2011-01-03 21:47:00 1167

原创 POJ 2771 最大独立集

Guardian of DecencyTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 3293 Accepted: 1375Descriptio

2010-12-31 20:22:00 1465

原创 Robot in Maze

<br />Robot in Maze<br />Time Limit:1000MS  Memory Limit:65536K<br />Total Submit:42 Accepted:15 <br />Description<br />There is a robot trapped in the maze. Now you have to send out some instructions, telling it how to reach its destination. <br /><br />T

2010-12-15 16:24:00 1733

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除