http://acm.hdu.edu.cn/showproblem.php?pid=2647  Reward 使用拓扑排序判断有无环   #include<stdio.h>  #include<stdlib.h>  #define N 10005  struct arc_node{&nbs
原创 2011-08-14 09:34:57
578阅读
原题链接 考察:拓扑排序+逆向思维 看来之前的反向并查集还是要补一下,这道题同样是利用逆向思维,再次碰到我还是不会写 思路: 这道题如果按正常的拓扑序列做,就难以得到正确答案,因为入度相同的点不一定都必须是同一报酬.但是如果我们将序列反转,那么求答案就容易得多.这样入度相同的点也不必是同一报酬.这些
转载 2021-01-11 01:23:00
110阅读
2评论
RewardTime Limit: 1000msMemory Limit: 32768KBThis problem will be judged onHDU. Original ID:264764-bit integer IO format:%I64d Java class name:MainDan...
转载 2014-08-29 16:30:00
40阅读
Problem Description
原创 2022-11-09 18:47:03
65阅读
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 9814 Accepted Submission(s): 3134 Problem Descrip
原创 2021-07-28 09:52:18
64阅读
RewardTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/s to his workers. Now he has a tro
原创 2022-03-18 14:30:21
74阅读
RewardTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4306    Accepted Submission(s): 1318Problem DescriptionDandelion's uncle is a
原创 2023-04-24 09:21:14
74阅读
链接:https://vjudge.net/problem/HDU-2647 题意: 老板发工资,存在a>b,每个人的保底工资为888,给出n个人的工资关系,求老板发的最少的工资。 思路: 拓扑排序,有环则-1。 同时,给的顺序是从大到小,变成从小到大的顺序,求起来简单。 代码:
转载 2019-03-07 10:37:00
49阅读
2评论
Dandelion's uncle is a boss of a factory. As the spring festival is coming , he wants to distribute rewards to his workers. Now he has a trouble about how to distribute the rewards.   The workers wil
原创 2022-10-19 16:11:44
32阅读
de #include #include #incl
原创 2023-06-12 14:18:14
6阅读
题目:http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=23269DescriptionDand
原创 2022-08-09 18:24:14
72阅读
题目地址:
原创 2023-04-14 00:08:32
60阅读
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2647 题意:让你给n个人发
原创 2022-11-23 10:10:43
45阅读
http://acm.hdu.edu.cn/showproblem.php?pid=2647定义一个数组 来标记 保证每次循环找到的是同一层次的 它们加的数是相同的 用f来表示找到多少个入度为0的点 2 #include 3 struct node 4 { 5 int v,w,next; 6 }men[20001]; 7 int first[10001],de[10001],t,kk[10001]; 8 void init() 9 {10 t = 0;11 memset(first,-1,sizeof(first));12 }13 void add(int u,int...
转载 2012-08-02 19:29:00
78阅读
2评论
RewardTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768: 1958Problem DescriptionDandelion's uncle i
原创 2022-08-05 10:46:02
35阅读
题目大意:老板要发酬劳,但是工人酬劳不一样,有N个人,M种情况。a的酬劳一定要高于b。每个人最低酬劳为888,问:老板最少要花费多少钱。思路:以b->a为有向边建立拓
原创 2014-12-22 15:50:20
76阅读
Reward Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Problem Description Dandelion's uncle is a
原创 2023-04-20 15:03:40
69阅读
include using namespace std; const int maxn = 1e5 + 10; const int mod = 142857; int t,n,m,k,x,u,v,num,ans; vector G[maxn]; int inDeg[maxn]; int sum[ma
转载 2018-06-13 22:04:00
60阅读
2评论
RewardProblem DescriptionDandelion's uncle is a boss of a factory. As the spring festival is coming , he wants to distribute rewards to his workers. N...
转载 2014-12-30 10:20:00
111阅读
2评论
RewardTime Limit: 2000/1000 MS (Java/Others) Memory Limit:
转载 2017-08-22 19:21:00
48阅读
2评论
  • 1
  • 2
  • 3
  • 4
  • 5