http://acm.hdu.edu.cn/showproblem.php?pid=2647RewardTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s)...
分类:
编程语言 时间:
2015-08-04 09:19:19
阅读次数:
195
1.反向建图,有利于计算
2.代码:#include
#include
#include
#define Max(a,b) ((a)>(b)?(a):(b))
using namespace std;
typedef struct ArcNode
{
int adjvex;
struct ArcNode * nextarc;
} ArcNode;
typedef struct...
分类:
编程语言 时间:
2015-08-01 14:18:10
阅读次数:
130
题目大意:有一家公司,要发奖金了。因为勤劳度不同的缘故,所以奖金不能人人都相同,问如何发奖金才能使得人人都满意,且所花费的总金额达到最小解题思路:我将攀比关系当成了有向边,并赋为-1,如果出现负环的话,表示怎样都不可能满足的
总金额达到最小,那只要比攀比的人多1就好了,这就是赋值为-1的缘故,接着SPFA,求出来,转为正值即可#include
#include ...
分类:
其他好文 时间:
2015-08-01 01:07:16
阅读次数:
93
题目连接http://acm.hdu.edu.cn/showproblem.php?pid=2647RewardDescriptionDandelion's uncle is a boss of a factory. As the spring festival is coming , he wan...
分类:
其他好文 时间:
2015-07-10 20:39:39
阅读次数:
156
题目连接http://acm.hdu.edu.cn/showproblem.php?pid=5154Harry and Magical ComputerDescriptionIn reward of being yearly outstanding magic student, Harry gets...
分类:
其他好文 时间:
2015-06-27 11:26:25
阅读次数:
150
Description
Seiji Hayashi had been a professor of the Nisshinkan Samurai School in the domain of Aizu for a long time in the 18th century. In order to reward him for his meritorious career in educa...
分类:
编程语言 时间:
2015-06-23 23:13:06
阅读次数:
257
Sightseeing CowsTime Limit:1000MSMemory Limit:65536KTotal Submissions:8331Accepted:2791DescriptionFarmer John has decided to reward his cows for their...
分类:
其他好文 时间:
2015-06-22 14:52:52
阅读次数:
93
Description
Seiji Hayashi had been a professor of the Nisshinkan Samurai School in the domain of Aizu for a long time in the 18th century. In order to reward him for his meritorious career in educa...
分类:
其他好文 时间:
2015-06-04 15:53:16
阅读次数:
122
Reward
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 4746 Accepted Submission(s): 1448
Problem Description
Dandelion's uncle is...
分类:
编程语言 时间:
2015-05-08 09:40:46
阅读次数:
137