码迷,mamicode.com
首页 >  
搜索关键字:hdu5326    ( 5个结果
hdu5326 Work
题目链接:点击打开链接 题目大意:有n个人。各自管理不同的人,问有多少人管理k个人。 思路:先记录每一个人的直接上级。然后模拟路径压缩的过程进行计数求和。 #include<stdio.h> #include<string.h> int p[105],sum[105]; void init() { ...
分类:其他好文   时间:2017-05-30 15:46:01    阅读次数:183
hdu5326 Work(树形dp)
题意:n个人,有n-1个关系,表示A管理B,求管理人数为K的人数。(间接上司也算上司) #include #include #include #include #include #include #include #include #include #include #define ll __int64 #define INF 0x3fffffff using namespace std; i...
分类:其他好文   时间:2015-08-29 12:46:12    阅读次数:140
解题报告 之 HDU5326 Work
HDU5326 图论基础 It’s an interesting experience to move from ICPC to work, end my college life and start a brand new journey in company. As is known to all, every stuff in a company has a title, everyone except the boss has a direct leader, and all the relat...
分类:其他好文   时间:2015-08-27 15:24:39    阅读次数:273
hdu5326(多校)
链接:http://acm.hdu.edu.cn/showproblem.php?pid=5326 Work Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1147 Accepted Submission(s): 695 ...
分类:其他好文   时间:2015-08-27 13:34:53    阅读次数:153
hdu5326 Work
题目链接:点击打开链接 题目大意:有n个人,各自管理不同的人,问有多少人管理k个人。 思路:先记录每个人的直接上级,然后模拟路径压缩的过程进行计数求和。 #include #include int p[105],sum[105]; void init() { int i; for(i=0;i<105;i++) { p[i]=i; sum...
分类:其他好文   时间:2015-08-13 20:15:53    阅读次数:131
5条  
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!