题目描述 约翰和贝茜在玩一个方块游戏.编号为 1\ldots n 1-n 的 n n ( 1 \leq n \leq 30000 1≤n≤30000 )个方块正放在地上,每个构成一个立方柱. 游戏开始后,约翰会给贝茜发出 P (1≤P≤100000 )个指令.指令有两种: 移动(M):将包含X的立方柱移动到包含Y的立方柱上. 统计(C):统计含X的立方柱中,在X下方的方块数目. 写个程序帮贝茜完成游戏. 输入输出格式 输入格式: 第1行输入 P ,之后 P 行每行输入一条指令,形式为"M X Y…
Cube Stacking Time Limit:2000MS Memory Limit:30000KB 64bit IO Format:%I64d & %I64u Submit Status Practice POJ 1988 Description Farmer John and Betsy are playing a game with N (1 <= N <= 30,000)identical cubes labeled 1 through N. They st…
Cube Stacking Time Limit: 2000MS Memory Limit: 30000K Total Submissions: 23678 Accepted: 8299 Case Time Limit: 1000MS Description Farmer John and Betsy are playing a game with N (1 <= N <= 30,000)identical cubes labeled 1 through N. They start w…