HDU——T 2818 Building Block】的更多相关文章

http://acm.hdu.edu.cn/showproblem.php?pid=2818 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5935    Accepted Submission(s): 1838 Problem Description John are playing with blocks. There are N…
Building Block Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3250    Accepted Submission(s): 973 Problem Description John are playing with blocks. There are N blocks (1 <= N <= 30000) numbere…
Building Block Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5811    Accepted Submission(s): 1790 Problem Description John are playing with blocks. There are N blocks (1 <= N <= 30000) number…
Problem Description John are playing with blocks. There are N blocks ( <= N <= ) numbered ...N.Initially, there are N piles, and each pile contains one block. Then John <= P <= ). There are two kinds of operation: M X Y : Put the whole pile co…
题意: 一共有30000个箱子,刚开始时都是分开放置的.接下来会有两种操作: 1. M x y,表示把x箱子所在的一摞放到y箱子那一摞上. 2. C y,表示询问y下方有多少个箱子. 输入: 首行输入一个整数m,表示一共有m次操作. 接下来每次操作都是上面所说的两种中的一种. 输出: 每次C y,输出一个结果,每次输出占1行. 就是不知道究竟是只有一组测试样例还是有多组测试样例,不过我还是按照多组的方式写了. 题解: 这道题我自己思考了好久都没有思路,最后中忍不住去看了题解,然后被题解震惊了.…
在进行并的时候不能瞎jb并,比如(x, y)就必须把x并给y ,即fa[x] = y #include <iostream> #include <string> #include <cstring> #include <algorithm> using namespace std; + ; int a[maxn]; int fa[maxn]; int Rank[maxn]; int cnt[maxn]; //种类 int Find(int x){ if (x…
Building Block Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 156 Accepted Submission(s): 70   Problem Description John are playing with blocks. There are N blocks (1 <= N <= 30000) numbered 1..…
Building Block Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5426 Accepted Submission(s): 1663 Problem DescriptionJohn are playing with blocks. There are N blocks (1 <= N <= 30000) numbered 1...…
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5538 Problem Description Have you ever played the video game Minecraft? This game has been one of the world's most popular game in recent years. The world of Minecraft is made up of lots of 1×1×1 blocks…
题目链接:acm.hdu.edu.cn/showproblem.php?pid=5538 House Building Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others) Total Submission(s): 621    Accepted Submission(s): 398 Problem Description Have you ever played the vid…