POJ
文章平均质量分 80
墨温温
呆萌理工女~ ~
展开
-
POJ 1422 (最少路径覆盖)
Air Raid Time Limit: 1000MS Memory Limit: 10000KB 64bit IO Format: %I64d & %I64u Description Consider a town where all the streets are one-way and eac原创 2015-08-24 12:45:32 · 563 阅读 · 0 评论 -
POJ 2342
Anniversary party Time Limit: 1000MS Memory Limit: 65536KB 64bit IO Format: %I64d & %I64u Description There is going to be a party to celebrate the 80-th Anniversary原创 2015-08-19 17:20:58 · 561 阅读 · 0 评论 -
POJ 1463
Strategic game Time Limit: 2000MS Memory Limit: 10000KB 64bit IO Format: %I64d & %I64u Description Bob enjoys playing computer games, especially strategic games, but原创 2015-08-19 18:06:43 · 333 阅读 · 0 评论 -
POJ 1459
A power network consists of nodes (power stations, consumers and dispatchers) connected by power transport lines. A node u may be supplied with an amount s(u) >= 0 of power, may produce an amount 0 <=原创 2015-08-21 18:17:37 · 681 阅读 · 0 评论 -
POJ 3281
Dining Time Limit: 2000MS Memory Limit: 65536KB 64bit IO Format: %I64d & %I64u Description Cows are such finicky eaters. Each cow has a preference f原创 2015-08-21 18:33:01 · 455 阅读 · 0 评论 -
POJ 1787(完全背包+记录路径)
POJ - 1787 Charlie's Change Time Limit: 1000MS Memory Limit: 30000KB 64bit IO Format: %I64d & %I64u Description Charlie is a driver of Advanced Cargo Movement, Lt原创 2015-09-06 21:33:27 · 433 阅读 · 0 评论 -
POJ 2392(多重背包)
Space Elevator Time Limit: 1000MS Memory Limit: 65536KB 64bit IO Format: %I64d & %I64u Description The cows are going to space! They plan to achieve orbit by buildin原创 2015-09-06 22:03:59 · 406 阅读 · 0 评论 -
POJ 3041
Asteroids Time Limit: 1000MS Memory Limit: 65536KB 64bit IO Format: %I64d & %I64u Description Bessie wants to navigate her spaceship through a dangero原创 2015-08-21 20:07:06 · 456 阅读 · 0 评论 -
POJ 2761(求区间第k小值)
Feed the dogs Time Limit: 6000MS Memory Limit: 65536KB 64bit IO Format: %I64d & %I64u Submit Status Description Wind loves pretty dogs very much, and she has n pe原创 2015-08-20 16:43:21 · 951 阅读 · 0 评论 -
POJ 4012
题目链接:http://poj.org/problem?id=4012 Problem B. Black Square Input file: black.in Output file: black.out Time limit: 3 seconds Memory limit: 256 megabytes Inspired by Kazimir Malevic原创 2015-08-18 22:37:37 · 652 阅读 · 0 评论 -
POJ 4014
ACM ICPC 2011–2012, NEERC, Northern Subregional Contest St Petersburg, October 29, 2011 Problem D. Dice Input file: dice.in Output file: dice.out Time limit: 3 seconds Memory limit: 256 m原创 2015-08-18 22:50:42 · 1113 阅读 · 0 评论 -
POJ 1273
Drainage Ditches Time Limit: 1000MS Memory Limit: 10000KB 64bit IO Format: %I64d & %I64u Every time it rains on Farmer John's fields, a pond forms over Bessie's f原创 2015-08-19 11:36:22 · 460 阅读 · 0 评论 -
POJ 2387
求最短路,套模板即可~ #include #include #include using namespace std; #define inf 0x7ffffff int w[1005][1005],v[1005],d[1005]; int t,n; int dijkstra(int s) { int p,minn; memset(v,0,sizeof(v)); for(int原创 2015-07-21 18:25:51 · 446 阅读 · 0 评论 -
POJ 2253
题意:求解从起点到终点的所有路径中,最长边最小是多少? 思路:dijkstra算法变形,用d[i]表示某条路径中的最长边即可。 AC代码: #include #include #include #include using namespace std; #define inf 0x7ffffff double edge[205][205]; double x[205],y[205],原创 2015-07-22 10:33:57 · 627 阅读 · 0 评论 -
POJ 3268
题意:所有牛要去X那里参加聚会,每头牛都走的是最短路,求往返的最长时间~(给出的边是单向的) 思路:dijkstra算法~ 所有牛从X返回时,可看做是求以X为起点的最短路,所有牛去X时,可以将邻接矩阵转置一下~ 两次结果求和,再取最大值即可~ AC代码: #include #include #include using namespace std; #define inf 0x7原创 2015-07-22 15:25:32 · 472 阅读 · 0 评论 -
POJ 3660
题意:给出任意两头牛在比赛中的位次关系,求根据所给的数据,能确定几头牛的rank~ 思路:求有向图的传递闭包问题~ 简单说,传递性就是如果点i和点k连通,点k和点j连通,那么点i和点j也连通~ 由此我们就可以判断出图中任意两点是否相连。 这道题可以用floyd算法求解,最后判断所有与某个点相连的点的个数是否等于n-1,就可以得出结果辣~ AC代码: #include #include原创 2015-07-22 16:08:22 · 619 阅读 · 0 评论 -
POJ 1860
需要判断是否有正权环存在,Bellman-Ford算法就可以辣~ AC代码: #include #include #include #include using namespace std; struct Edge { int u,v; double r,c; }edge[210]; int n,m,s,k; double w; double d[105]; int bellm原创 2015-07-22 20:34:21 · 511 阅读 · 0 评论 -
POJ 1797
题意:求从起点到终点的所有路径中,最短边的最大值~ 思路:dijkstra算法~ 变形~d[i]表示从起点到i点的最短边。原创 2015-07-22 17:11:31 · 277 阅读 · 0 评论 -
POJ 3259
求是否存在负圈环~ 把NO写成了N0,调了一下午orz~~ #include #include #include using namespace std; #define inf 0x7ffffff int n,m,s,k; int d[510]; struct Edge { int u,v,w; }edge[5300]; int bellmanford() { int flag;原创 2015-07-24 16:20:35 · 272 阅读 · 0 评论 -
POJ 1442(treap || 优先队列)
treap套用模板即可:原创 2015-08-18 00:07:06 · 925 阅读 · 0 评论 -
POJ 4011
ACM ICPC 2011–2012, NEERC, Northern Subregional Contest St Petersburg, October 29, 2011 Problem A. Automated Telephone Exchange Input file: ate.in Output file: ate.out Time limit: 3 seconds Memo原创 2015-08-18 22:18:09 · 480 阅读 · 0 评论 -
POJ 1469
COURSES Time Limit: 1000MS Memory Limit: 10000KB 64bit IO Format: %I64d & %I64u Submit Status Description Consider a group of N students and P courses. Each stu原创 2015-08-21 19:21:00 · 313 阅读 · 0 评论