摘要: Power StringsTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 43624 Accepted: 18200DescriptionGiven two strings a and b we defi... 阅读全文
posted @ 2016-08-05 11:07 Lawliet__zmz 阅读(149) 评论(0) 推荐(0) 编辑
摘要: Til the Cows Come HomeTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 44129 Accepted: 15001DescriptionBessie is out in the fie... 阅读全文
posted @ 2016-08-05 10:00 Lawliet__zmz 阅读(151) 评论(0) 推荐(0) 编辑
摘要: Automatic PoetryTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 2202 Accepted: 1119DescriptionBackground"Oh God", Lara Croft exclaims, "it's... 阅读全文
posted @ 2016-08-04 22:18 Lawliet__zmz 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 昂贵的聘礼Time Limit: 1000MS Memory Limit: 10000KTotal Submissions: 45367 Accepted: 13436Description年轻的探险家来到了一个印第安部落里。在那里他和酋长的女儿相爱了,于是便向酋长去求亲。酋长要他用10000个金币... 阅读全文
posted @ 2016-08-04 18:13 Lawliet__zmz 阅读(120) 评论(0) 推荐(1) 编辑
摘要: 通过在网站上的资料搜集,得到了很多关于string类用法的文档,通过对这些资料的整理和加入一些自己的代码,就得出了一份比较完整的关于string类函数有哪些和怎样用的文档了!下面先罗列出string类的函数有哪一些,然后再罗列出函数的原型,最后到代码的实现标准C++中提供的string类得功能也是非... 阅读全文
posted @ 2016-08-04 11:25 Lawliet__zmz 阅读(4285) 评论(0) 推荐(1) 编辑
摘要: ArbitrageTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 20575 Accepted: 8768DescriptionArbitrage is the use of discrepancies in currency ex... 阅读全文
posted @ 2016-08-03 21:08 Lawliet__zmz 阅读(107) 评论(0) 推荐(0) 编辑
摘要: Heavy TransportationTime Limit: 3000MS Memory Limit: 30000KTotal Submissions: 29430 Accepted: 7864DescriptionBackgroundHugo Heavy is happy. After the ... 阅读全文
posted @ 2016-08-03 15:20 Lawliet__zmz 阅读(132) 评论(0) 推荐(0) 编辑
摘要: Stockbroker GrapevineTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 33859 Accepted: 18711DescriptionStockbrokers are known to overreact to ... 阅读全文
posted @ 2016-08-03 11:25 Lawliet__zmz 阅读(198) 评论(0) 推荐(0) 编辑
摘要: FroggerTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 37130 Accepted: 11944DescriptionFreddy Frog is sitting on a stone in the middle of a ... 阅读全文
posted @ 2016-08-03 10:38 Lawliet__zmz 阅读(149) 评论(0) 推荐(0) 编辑
摘要: HighwaysTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 28368 Accepted: 12924DescriptionThe island nation of Flatopia is perfectly flat. Unf... 阅读全文
posted @ 2016-08-02 21:56 Lawliet__zmz 阅读(249) 评论(0) 推荐(0) 编辑
摘要: #include#include#include using namespace std;const int maxn = 2000+10;char map[maxn][10];int f[maxn];int n,cnt;struct edge{ int u,v; int w;}e[ma... 阅读全文
posted @ 2016-08-02 20:28 Lawliet__zmz 阅读(206) 评论(0) 推荐(0) 编辑
摘要: Truck HistoryTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 24751 Accepted: 9647DescriptionAdvanced Cargo Movement, Ltd. uses trucks of dif... 阅读全文
posted @ 2016-08-02 20:23 Lawliet__zmz 阅读(153) 评论(0) 推荐(0) 编辑
摘要: FrecklesTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 8309 Accepted: 3952DescriptionIn an episode of the Dick Van Dyke show, little Richie... 阅读全文
posted @ 2016-08-02 18:15 Lawliet__zmz 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 都是套路,换题不换意Agri-NetTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 51655 Accepted: 21544DescriptionFarmer John has been elected mayor of his ... 阅读全文
posted @ 2016-08-02 17:39 Lawliet__zmz 阅读(122) 评论(0) 推荐(0) 编辑
摘要: Agri-NetTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 51653 Accepted: 21544DescriptionFarmer John has been elected mayor of his town! One ... 阅读全文
posted @ 2016-08-02 17:28 Lawliet__zmz 阅读(138) 评论(0) 推荐(0) 编辑
摘要: Constructing RoadsTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 22440 Accepted: 9588DescriptionThere are N villages, which are numbered fr... 阅读全文
posted @ 2016-08-02 17:10 Lawliet__zmz 阅读(148) 评论(0) 推荐(0) 编辑
摘要: Prim算法1.概览普里姆算法(Prim算法),图论中的一种算法,可在加权连通图里搜索最小生成树。意即由此算法搜索到的边子集所构成的树中,不但包括了连通图里的所有顶点(英语:Vertex (graph theory)),且其所有边的权值之和亦为最小。该算法于1930年由捷克数学家沃伊捷赫·亚尔尼克(... 阅读全文
posted @ 2016-08-02 11:22 Lawliet__zmz 阅读(144) 评论(0) 推荐(0) 编辑
摘要: Children of the Candy CornTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 12755 Accepted: 5481DescriptionThe cornfield maze is a popular Hal... 阅读全文
posted @ 2016-08-02 10:24 Lawliet__zmz 阅读(150) 评论(0) 推荐(0) 编辑
摘要: Catch That CowTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 75331 Accepted: 23781DescriptionFarmer John has been informed of the location ... 阅读全文
posted @ 2016-08-01 17:00 Lawliet__zmz 阅读(138) 评论(0) 推荐(0) 编辑
摘要: A Knight's JourneTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 40970 Accepted: 13938DescriptionBackgroundThe knight is getting bored of se... 阅读全文
posted @ 2016-08-01 15:18 Lawliet__zmz 阅读(172) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=1572 看了网上那么多行的C++代码的做法我也是被吓到了,其实用C++的string类函数很简单啊关键是替换的字符串不能回头,不然有些测试数据,一个循环过后,你又回头重新再新串中去查,很可能就无限循环了。1.假如定义一个string s[... 阅读全文
posted @ 2016-07-30 17:16 Lawliet__zmz 阅读(160) 评论(0) 推荐(0) 编辑
摘要: 迷宫问题Time Limit: 1000MS Memory Limit: 65536KTotal Submissions: 15775 Accepted: 9389Description定义一个二维数组:int maze[5][5] = { 0, 1, 0, 0, 0, 0, 1, 0, 1, 0,... 阅读全文
posted @ 2016-07-30 16:33 Lawliet__zmz 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 和上个DFS的问题一样,这次用BFS的思想,BFS没有像DFS那样专门有个step累加,是靠队列思想实现,更像一群路径竞速,最快的到达后,就break输出了#include struct node{ int x; int y; int f;//父亲在队列中的编号,本题不要求输出路径... 阅读全文
posted @ 2016-07-30 09:45 Lawliet__zmz 阅读(226) 评论(0) 推荐(0) 编辑
摘要: 解救人质,给一张二维地图,有障碍的点不能移动,给定起始点和人质坐标,求到达人质路程的最短路程,DFS模型#include #include using namespace std;int n,m,p,q,Min=99999999;int a[51][51],book[51][51];void dfs... 阅读全文
posted @ 2016-07-29 20:52 Lawliet__zmz 阅读(149) 评论(0) 推荐(0) 编辑
摘要: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=8&problem=620&mosmsg=Submission+received+with+ID+1775... 阅读全文
posted @ 2016-07-29 18:45 Lawliet__zmz 阅读(147) 评论(0) 推荐(0) 编辑