2012年10月24日

poj 1166 简单搜索

摘要: The ClocksTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 12508Accepted: 4949Description|-------| |-------| |-------|| | | | | | ||---O | |---O | | O || | | | | ||-------| |-------| |-------| A B ... 阅读全文

posted @ 2012-10-24 19:03 yumao 阅读(171) 评论(0) 推荐(0) 编辑

2012年10月22日

BFS进阶 poj 1184

摘要: 聪明的打字员Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 5391Accepted: 1097Description阿兰是某机密部门的打字员,她现在接到一个任务:需要在一天之内输入几百个长度固定为6的密码。当然,她希望输入的过程中敲击键盘的总次数越少越好。 不幸的是,出于保密的需要,该部门用于输入密码的键盘是特殊设计的,键盘上没有数字键,而只有以下六个键:Swap0, Swap1, Up, Down, Left, Right,为了说明这6个键的作用,我们先定义录入区的6个位置的编号,从左至右依次为1,2,3,4,5,6。下面列 阅读全文

posted @ 2012-10-22 00:14 yumao 阅读(207) 评论(0) 推荐(0) 编辑

2012年10月5日

poj 1860 最短路径变形

摘要: Currency ExchangeTime Limit: 1000MSMemory Limit: 30000KTotal Submissions: 14000Accepted: 4808DescriptionSeveral currency exchange points are working in our city. Let us suppose that each point specializes in two particular currencies and performs exchange operations only with these currencies. There 阅读全文

posted @ 2012-10-05 22:16 yumao 阅读(167) 评论(0) 推荐(0) 编辑

最大流 poj 3436

摘要: ACM Computer FactoryTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 4145Accepted: 1391Special JudgeDescriptionAs you know, all the computers used for ACM contests must be identical, so the participants compete on equal terms. That is why all these computers are historically produced at the 阅读全文

posted @ 2012-10-05 17:42 yumao 阅读(146) 评论(0) 推荐(0) 编辑

2012年10月4日

DFS poj 2488

摘要: A Knight's JourneyTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 22060Accepted: 7453DescriptionBackground The knight is getting bored of seeing the same black and white squares again and again and has decided to make a journey around the world. Whenever a knight moves, it is two square 阅读全文

posted @ 2012-10-04 17:23 yumao 阅读(172) 评论(0) 推荐(0) 编辑

2012年10月3日

STL实现全排列 next_permutation

摘要: 在#include<algorithm>的头文件中next_permutation(a,a+len);返回的是一个bool类型的值;直到找不到全排列为止,返回false。并且对全排列重复出现的情况可以过滤,即最后得出的全排列的结果中,不会有相同的出现。并且貌似只能从小到大的产生排列,也就是说,如果a中的字符串为刚好从大到小,那么就一组都产生不了。OrdersTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 8117Accepted: 5059DescriptionThe stores manager has sorte 阅读全文

posted @ 2012-10-03 22:04 yumao 阅读(3094) 评论(0) 推荐(0) 编辑

2012年9月27日

floyd 求最小环 poj 1734

摘要: Sightseeing tripTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 3649Accepted: 1400Special JudgeDescriptionThere is a travel agency in Adelton town on Zanzibar island. It has decided to offer its clients, besides many other attractions, sightseeing the town. To earn as much as possible from 阅读全文

posted @ 2012-09-27 22:36 yumao 阅读(368) 评论(0) 推荐(0) 编辑

DAG图上单源最短路径 poj 3249

摘要: Test for JobTime Limit: 5000MSMemory Limit: 65536KTotal Submissions: 7475Accepted: 1634DescriptionMr.Dog was fired by his company. In order to support his family, he must find a new job as soon as possible. Nowadays, It's hard to have a job, since there are swelling numbers of the unemployed. So 阅读全文

posted @ 2012-09-27 19:34 yumao 阅读(1025) 评论(0) 推荐(0) 编辑

2012年9月26日

树状数组求最值 hdu 1754

摘要: 模板题,木有什么好说的。。。直接上模板吧~代码实现:#include<iostream>#include<stdio.h>#include<string.h>using namespace std;int num[200050];int tree[200050];int n;int bit(int x){ return x&(-x);}int insert(int p,int v){ num[p]=v; for(int k=p;k<=n;k+=bit(k)){ if(tree[k]<v){ tree[k]=v; ... 阅读全文

posted @ 2012-09-26 11:23 yumao 阅读(250) 评论(0) 推荐(0) 编辑

2012年9月22日

二分法 poj 1905

摘要: Expanding RodsTime Limit: 1000MSMemory Limit: 30000KTotal Submissions: 8686Accepted: 2152DescriptionWhen a thin rod of length L is heated n degrees, it expands to a new length L'=(1+n*C)*L, where C is the coefficient of heat expansion. When a thin rod is mounted on two solid walls and then heate 阅读全文

posted @ 2012-09-22 19:46 yumao 阅读(421) 评论(0) 推荐(0) 编辑

导航