- 博客(19)
- 资源 (5)
- 收藏
- 关注
原创 poj3259Wormholes(bellman判断负环的问题最短路)
WormholesTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 43765 Accepted: 16071DescriptionWhile exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole
2016-07-31 14:38:00 305
原创 fgfdg
#include#includestruct node{ int a,b; double rat,cos;}p[1000];double dis[1000];int m,n,s;double v;int ss;int Bellman_ford(){ memset(dis,0,sizeof(dis)); dis[s] = v; int i,
2016-07-30 21:38:19 324
转载 poj 2049poj2049 - Finding Nemo
#include#include #include #includeusing namespace std;#define MAXV 210#define INF 1<<29#define min(a,b) (a>b?b:a)#define max(a,b) (a>b?a:b)#define EMPTY 0#define DOOR 1#define WALL INFin
2016-07-30 15:40:02 647
原创 poj1285 Agri-Net(最短路)
Agri-NetTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 51426 Accepted: 21441DescriptionFarmer John has been elected mayor of his town! One of his campaign promises was to bring internet con
2016-07-29 17:54:58 361
原创 poj 2485 Highways(最小生成树中求最大权值)
HighwaysTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 28287 Accepted: 12880DescriptionThe island nation of Flatopia is perfectly flat. Unfortunately, Flatopia has no public highways. So th
2016-07-29 15:41:23 375
原创 poj1789ruck History
ruck HistoryTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 24587 Accepted: 9570DescriptionAdvanced Cargo Movement, Ltd. uses trucks of different types. Some trucks are used for vegetable de
2016-07-29 13:35:12 289
原创 The Suspects (并查集的应用)
Time Limit: 1000MS Memory Limit: 20000KTotal Submissions: 33094 Accepted: 16041DescriptionSevere acute respiratory syndrome (SARS), an atypical pneumonia of unknown aetiology, was recognized as a glob
2016-07-29 08:58:07 331
原创 poj 1573 Robot Motion(模拟)
Robot MotionTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 12761 Accepted: 6180DescriptionA robot has been programmed to follow the instructions in its path. Instructions for the next dir
2016-07-28 20:21:37 304
原创 poj 3295
TautologyTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 11831 Accepted: 4476DescriptionWFF 'N PROOF is a logic game played with dice. Each die has six faces representing some subset of the
2016-07-28 11:27:26 333
原创 poj 2506Tiling
TilingTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 9204 Accepted: 4378DescriptionIn how many ways can you tile a 2xn rectangle by 2x1 or 2x2 tiles? Here is a sample tiling of a 2x17 rec
2016-07-27 08:30:11 353
转载 大数相加
大数的加法简单C语言版直接复制到VC++就可运行#include#includevoidmain(){chars1[200],s2[200];intnum1[200]={0},num2[200]={0},len1,len2,i,j; //数组清零gets(s1);gets(s2); //输入两个大数装入字符数组len1=strlen(s1
2016-07-26 21:40:16 245
原创 The Pilots Brothers' refrigerator
The Pilots Brothers' refrigeratorTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 19011 Accepted: 7277 Special JudgeDescriptionThe game “The Pilots Brothers: following the stripy elephant” ha
2016-07-26 21:00:58 357
转载 poj 1068
Time Limit: 1000MS Memory Limit: 10000KTotal Submissions: 19550 Accepted: 11804DescriptionLet S = s1 s2...s2n be a well-formed string of parentheses. S can be encoded in two
2016-07-26 17:07:51 396
转载 poj 1753 : Flip Game (枚举+dfs)
poj 1753 : Flip Game (枚举+dfs)题意:一个4*4的矩阵,每一格要么是白色,要么是黑色。现在你可以选择任意一个格变成相反的颜色,则这个格的上,下,左,右四个格也会跟着变成相反的色(如果存在的话)。问要把矩阵的所有格子变成同一个颜色,你最少需执行几次上面的操作。 思路:枚举+dfs。一个关键点:对于每一格,只能翻0或1次(易证)。因此枚举就存在2^16 =40
2016-07-26 09:40:03 363
转载 Radar Installation
Radar InstallationTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 51131 Accepted: 11481DescriptionAssume the coasting is an infinite straight line
2016-07-25 17:24:33 486
原创 已知中序后序求前序
#include #include #include #includeusing namespace std;struct TreeNode{ struct TreeNode* left; struct TreeNode* right; char elem;};TreeNode* BinaryTreeFromOrderings(char* inorder,
2016-07-25 11:11:41 459
原创 已知前序中序求后序
#include#include#includetypedef struct node{ char data; struct node *l,*r;}tree;tree *creat(char *pre,char *in,int len)/*中序遍历中根节点的左边全都是左子树的中序,右边全是右子树中序。然而每个子树的先序序列的第一个节点是子树的根,而且向后移动中序查
2016-07-25 11:10:03 418
原创 树的创建与遍历 叶子数 与深度
#include#includestruct tree{ char data; struct tree *l,*r;};struct tree *t,*p;int count=0;struct tree*creat(struct tree *t)/*创建二叉树-递归*/ { char c; c=getchar(); if(c==',
2016-07-25 11:07:54 363
原创 Catch That Cow
Catch That CowTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 74038 Accepted: 23331DescriptionFarmer John has been informed of the location of a fugitiv
2016-07-25 10:36:27 315
city_info1.txt
2020-10-31
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人