POJ 1251 Jungle Roads(经典最小生成树-----prim)

POJ 1251 Jungle Roads Description   The Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money was spent on extr...

2018-07-31 18:35:54

阅读数 53

评论数 0

poj2387-Til the Cows Come Home(入门最短路径 dijkstra)

  Description 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 mo...

2018-07-31 15:18:46

阅读数 37

评论数 0

POJ1308/HDU 1325 Is It A Tree?(并查集应用)

Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 421 Accepted Submission(s): 157   Pro...

2018-07-31 13:23:06

阅读数 41

评论数 0

HDU 1116 Play on Words(并查集+欧拉通路)

Problem Description Some of the secret doors contain a very interesting word puzzle. The team of archaeologists has to solve it to open that doors. ...

2018-07-29 22:13:46

阅读数 75

评论数 0

poj 2262 Goldbach's Conjecture(数论、素数筛选)

Description In 1742, Christian Goldbach, a German amateur mathematician, sent a letter to Leonhard Euler in which he made the following conjecture: ...

2018-07-25 23:53:58

阅读数 33

评论数 0

HDU A/B 数论,枚举

Problem Description  要求(A/B)%9973,但由于A很大,我们只给出n(n=A%9973)(我们给定的A必能被B整除,且gcd(B,9973) = 1)。 Input  数据的第一行是一个T,表示有T组数据。  每组数据有两个数n(0 <= n &a...

2018-07-24 17:43:42

阅读数 109

评论数 0

HDU 5019 数论、公因数

  Revenge of GCD Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 226    Accepted Submissio...

2018-07-24 16:09:40

阅读数 109

评论数 0

HOJ2136 素数,筛选法

Problem Description Everybody knows any number can be combined by the prime number. Now, your task is telling me what position of the largest prime f...

2018-07-24 13:17:18

阅读数 43

评论数 0

POJ-1182 食物链,向量思维(并查集)

刚学会基础的并查集,今天刷poj的时候做到了一个带权的并差查集,到网上搜了很多都看不懂啊。。。。 直到看了小牛用向量偏移思维解题思路,终于能大体上了解了, 附上链接https://blog.csdn.net/niushuai666/article/details/6981689 题目:htt...

2018-07-22 20:49:28

阅读数 99

评论数 0

CodeForces - 948A

Bob is a farmer. He has a large pasture with many sheep. Recently, he has lost some of them due to wolf attacks. He thus decided to place some shephe...

2018-07-20 17:22:07

阅读数 61

评论数 0

POJ1751 _Highways(最小生成树——prim)

Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 6078   Accepted: 1650   Special Judge Description The island nati...

2018-07-20 14:28:35

阅读数 82

评论数 0

POJ -2236 Wireless Network

题目: Wireless Network An earthquake takes place in Southeast Asia. The ACM (Asia Cooperated Medical team) have set up a wireless network with the la...

2018-07-20 13:56:43

阅读数 53

评论数 0

取消 删除