- 博客(33)
- 资源 (2)
- 收藏
- 关注
原创 POJ 1847----Tram(Floyd)
DescriptionTram network in Zagreb consists of a number of intersections and rails connecting some of them. In every intersection there is a switch pointing to the one of the rails going out of the inte
2017-02-23 20:48:14 371 2
原创 POJ - 3660----Cow Contest (Floyd)
题目大意:有n头牛比赛,m种比赛结果,求一共有多少头牛的排名被确定了。 思路:如果一头牛与所有别的牛的比赛结果都确定,就是说这头牛的排名确定了,可用Floyd来做#include<algorithm>#include<iostream>#include<stdlib.h>#include<cstring>#include<cstdio>#include<cstdio>#include<
2017-02-21 20:05:47 343
原创 POJ - 1502----MPI Maelstrom(Dijkstra)
BIT has recently taken delivery of their new supercomputer, a 32 processor Apollo Odyssey distributed shared memory machine with a hierarchical communication subsystem. Valentine McKee’s research advis
2017-02-21 19:57:16 312
原创 POJ - 3259----Wormholes(Bellman-Ford)
While exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very peculiar because it is a one-way path that delivers you to its destination at a time that is
2017-02-20 19:57:12 332
原创 POJ - 3268----Silver Cow Party(Dijkstra)
One cow from each of N farms (1 ≤ N ≤ 1000) conveniently numbered 1..N is going to attend the big cow party to be held at farm #X (1 ≤ X ≤ N). A total of M (1 ≤ M ≤ 100,000) unidirectional (one-way roa
2017-02-20 19:49:19 580
原创 POJ - 1797----Heavy Transportation(Dijkstra)
Background Hugo Heavy is happy. After the breakdown of the Cargolifter project he can now expand business. But he needs a clever man who tells him whether there really is a way from the place his cus
2017-02-19 21:40:07 324
原创 POJ - 2387----Til the Cows Come Home(Dijkstra)
Bessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes her for the morning milking. Bessie needs her beauty sleep, so she wants to get ba
2017-02-19 21:36:18 294
原创 POJ 1679----The Unique MST(prim)
Problem Description Given a connected undirected graph, tell if its minimum spanning tree is unique.Definition 1 (Spanning Tree): Consider a connected, undirected graph G = (V, E). A spanning tree of
2017-02-18 20:09:09 368
原创 POJ 1258----Agri-Net(prim)
Description Farmer John has been elected mayor of his town! One of his campaign promises was to bring internet connectivity to all farms in the area. He needs your help, of course. Farmer John order
2017-02-18 20:04:37 286
原创 POJ - 1751----Highways(Kruskal)
The island nation of Flatopia is perfectly flat. Unfortunately, Flatopia has a very poor system of public highways. The Flatopian government is aware of this problem and has already constructed a numbe
2017-02-17 19:47:54 341
原创 POJ - 2349----Arctic Network(prim)
Description The Department of National Defence (DND) wishes to connect several northern outposts by a wireless network. Two different communication technologies are to be used in establishing the netw
2017-02-17 19:42:47 329
原创 POJ - 1789----Truck History(prim)
Advanced Cargo Movement, Ltd. uses trucks of different types. Some trucks are used for vegetable delivery, other for furniture, or for bricks. The company has its own code describing each type of a tru
2017-02-16 21:47:49 230
原创 POJ - 1287----Networking(prim)
You are assigned to design network connections between certain points in a wide area. You are given a set of points in the area, and a set of possible routes for the cables that may connect pairs of po
2017-02-16 21:40:55 251
原创 POJ - 1251----Jungle Roads(prim)
The Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money was spent on extra roads between villages some years ago. But the jungle overtakes roads relentlessly, so
2017-02-15 22:08:51 604
原创 HDU - 1078----FatMouse and Cheese(dp制表)
FatMouse has stored some cheese in a city. The city can be considered as a square grid of dimension n: each grid location is labelled (p,q) where 0 <= p < n and 0 <= q < n. At each grid location Fatmou
2017-02-15 22:01:37 363
原创 POJ - 3186----Treats for the Cows
FJ has purchased N (1 <= N <= 2000) yummy treats for the cows who get money for giving vast amounts of milk. FJ sells one treat per day and wants to maximize the money he receives over a given period t
2017-02-14 23:16:02 419
原创 POJ - 2533----Longest Ordered Subsequence
A numeric sequence of ai is ordered if a1 < a2 < … < aN. Let the subsequence of the given numeric sequence ( a1, a2, …, aN) be any sequence ( ai1, ai2, …, aiK), where 1 <= i1 < i2 < … < iK <= N. For ex
2017-02-14 23:08:11 370
原创 POJ - 1458----Common Subsequence
A subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = < x1, x2, …, xm > another sequence Z = < z1, z2, …, zk > is a subsequence of X
2017-02-13 20:33:17 248
原创 HDU - 1160----FatMouse's Speed
FatMouse believes that the fatter a mouse is, the faster it runs. To disprove this, you want to take the data on a collection of mice and put as large a subset of this data as possible into a sequence
2017-02-13 20:28:45 448
原创 HDU - 1257----最少拦截系统
某国为了防御敌国的导弹袭击,发展出一种导弹拦截系统.但是这种导弹拦截系统有一个缺陷:虽然它的第一发炮弹能够到达任意的高度,但是以后每一发炮弹都不能超过前一发的高度.某天,雷达捕捉到敌国的导弹来袭.由于该系统还在试用阶段,所以只有一套系统,因此有可能不能拦截所有的导弹. 怎么办呢?多搞几套系统呗!你说说倒蛮容易,成本呢?成本是个大问题啊.所以俺就到这里来求救了,请帮助计算一下最少需要多少套拦截系统
2017-02-12 22:03:54 417
原创 HDU - 1260----Tickets
Jesus, what a great movie! Thousands of people are rushing to the cinema. However, this is really a tuff time for Joe who sells the film tickets. He is wandering when could he go back home as early as
2017-02-12 21:58:38 401
原创 HDU - 1176----免费馅饼
都说天上不会掉馅饼,但有一天gameboy正走在回家的小径上,忽然天上掉下大把大把的馅饼。说来gameboy的人品实在是太好了,这馅饼别处都不掉,就掉落在他身旁的10米范围内。馅饼如果掉在了地上当然就不能吃了,所以gameboy马上卸下身上的背包去接。但由于小径两侧都不能站人,所以他只能在小径上接。由于gameboy平时老呆在房间里玩游戏,虽然在游戏中是个身手敏捷的高手,但在现实中运动神经特别迟钝,
2017-02-11 20:26:25 365
原创 HDU - 1114----Piggy-Bank
Before ACM can do anything, a budget must be prepared and the necessary financial support obtained. The main income for this action comes from Irreversibly Bound Money (IBM). The idea behind is simple.
2017-02-11 20:22:37 357
原创 HDU - 1087----Super Jumping! Jumping! Jumping!
Nowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU. Maybe you are a good boy, and know little about this game, so I introduce it to you now. The game can be
2017-02-09 22:24:56 343
原创 HDU - 1029----Ignatius and the Princess IV
“OK, you are not too bad, em… But you can never pass the next test.” feng5166 says. “I will tell you an odd number N, and then N integers. There will be a special integer among them, you have to tell m
2017-02-09 22:20:24 343
原创 HDU - 1024----Max Sum Plus Plus
Now I think you have got an AC in Ignatius.L’s “Max Sum” problem. To be a brave ACMer, we always challenge ourselves to more difficult problems. Now you are faced with a more difficult problem. Given a
2017-02-07 14:57:20 333
原创 HDU - 1560----DNA sequence
The twenty-first century is a biology-technology developing century. We know that a gene is made of DNA. The nucleotide bases from which DNA is built are A(adenine), C(cytosine), G(guanine), and T(thym
2017-02-07 14:30:57 578
原创 HDU - 3533----Escape(BFS+预处理)
The students of the HEU are maneuvering for their military training. The red army and the blue army are at war today. The blue army finds that Little A is the spy of the red army, so Little A has to
2017-02-05 20:53:29 342
原创 HDU - 2181----哈密顿绕行世界问题
一个规则的实心十二面体,它的 20个顶点标出世界著名的20个城市,你从一个城市出发经过每个城市刚好一次后回到出发的城市。 Input前20行的第i行有3个数,表示与第i个城市相邻的3个城市.第20行以后每行有1个数m,m<=20,m>=1.m=0退出. Output输出从第m个城市出发经过每个城市1次又回到m的所有路线,如有多条路线,按字典序输出,每行1条路线.每行首先输出是第几条路线.然后个
2017-02-05 20:41:34 524
原创 HDU - 1495-----非常可乐
大家一定觉的运动以后喝可乐是一件很惬意的事情,但是seeyou却不这么认为。因为每次当seeyou买了可乐以后,阿牛就要求和seeyou一起分享这一瓶可乐,而且一定要喝的和seeyou一样多。但seeyou的手中只有两个杯子,它们的容量分别是N 毫升和M 毫升 可乐的体积为S (S<101)毫升 (正好装满一瓶) ,它们三个之间可以相互倒可乐 (都是没有刻度的,且 S==N+M,101>S>0,N>
2017-02-04 13:49:02 790
原创 POJ - 3984----迷宫问题
定义一个二维数组: int maze[5][5] = {0, 1, 0, 0, 0,0, 1, 0, 1, 0,0, 0, 0, 0, 0,0, 1, 1, 1, 0,0, 0, 0, 1, 0,};它表示一个迷宫,其中的1表示墙壁,0表示可以走的路,只能横着走或竖着走,不能斜着走,要求编程序找出从左上角到右下角的最短路线。Input一个5 × 5的二维数组,表示一个迷宫。数据保证有唯一解。O
2017-02-04 13:45:18 381
原创 FZU - 2150----Fire Game(BFS+枚举)
Fat brother and Maze are playing a kind of special (hentai) game on an N*M board (N rows, M columns). At the beginning, each grid of this board is consisting of grass or just empty and then they start
2017-02-02 21:03:41 453
原创 POJ - 3414----Pots
You are given two pots, having the volume of A and B liters respectively. The following operations can be performed:FILL(i) fill the pot i (1 ≤ i ≤ 2) from the tap; DROP(i) empty the pot i
2017-02-02 20:42:47 392
代码之殇_965d2
2018-08-19
[ANDROID核心原理与系统应用高效开发].韩超.扫描版
2018-08-19
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人