hdu 5774 Where Amazing Happens】的更多相关文章

Where Amazing Happens 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5774 Description As the premier men's professional basketball league in the world, the National Basketball Association (NBA) has witnessed many superstars, legendary teams and prec…
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5774 题目大意: 已知1946~2015每一年赢得人是谁,给n个名字,问赢了多少次. 题目思路: [模拟] 打个表就好. #include<stdio.h> #include<string.h> ][]= {"Cleveland Cavaliers", "Golden State Warriors", "San Antonio Spu…
Where Amazing Happens 题意: 让你输出各个队名的出现次数. 题解: 打表题,好坑,相同的没有放在一起,需要认真找,否则容易错. 代码: #include<iostream> #include<cstdio> #include<map> #include<cstring> #include<string> using namespace std; map<string,int>a; int main() { a[&…
Super Mario Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 5101    Accepted Submission(s): 2339 Problem Description Mario is world-famous plumber. His “burly” figure and amazing jumping abilit…
http://acm.split.hdu.edu.cn/showproblem.php?pid=4336 Card Collector Special Judge Problem Description   In your childhood, do you crazy for collecting the beautiful cards in the snacks? They said that, for example, if you collect all the 108 people i…
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=4336 Card Collector Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) 问题描述 In your childhood, do you crazy for collecting the beautiful cards in the snacks? They said that,…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5463 Clarke and minecraft Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 366    Accepted Submission(s): 193 Problem Description Clarke is a patien…
Alice and Bob Time Limit: 20 Sec  Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=4111 Description Alice and Bob are very smart guys and they like to play all kinds of games in their spare time. The most amazing thing is that they…
[题目链接] http://acm.hdu.edu.cn/showproblem.php?pid=6060 [题目大意] 给一个n个节点的树,要求将2-n号节点分成k部分, 然后将每一部分加上节点1,求每个集合最小斯坦纳树的最大权值和. [题解] 我们按照后序遍历染色分组,得到的一定是最优分组, 现在考虑在不同颜色的虚树上求路径权值和, 我们发现每个点增加的权值是深度减去到根的路径上已被覆盖的长度, 这个长度等于与dfs序前继的LCA的深度,因此我们在搜索的同时计算与dfs序前继的LCA即可.…
BestCoder Sequence Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1614    Accepted Submission(s): 566 Problem Description Mr Potato is a coder.Mr Potato is the BestCoder. One night, an amazing…