2.17号英语翻译
题目来源:https://acs.jxnu.edu.cn/problem/ICPCJX2021F
重点词汇:
hanoi:n.河内;
dist:圆盘;
diameter:n.直径;
rod:n.杆,棍;
conical:adj.圆锥的;
stack:n.堆;
obey:v.遵守,服从;
Four Column Hanoi Tower
2000ms 262144K
描述:
Based on the classical problem of tower of Hanoi, there are four rods indexed by $A,B,C,D$ (the only difference between this problem and the classical one) and $N$ disks of various diameters, which can slide onto any rod. The puzzle begins with disks stacked on one rod in order of decreasing size, the smallest on the top, thus approximating a conical shape. The objective of the puzzle is to move the entire stack to the last rod (indexed by D), obeying the following rules:
- Only one disk may be moved at a time.
- Each move consists of taking the upper disk from one of the stacks and placing it on top of another stack or on an empty rod.
- No disk may be placed on top of a disk that is smaller than it.
You need to calculate the minimum number of moves required to solve the problem.
基于河内塔的经典问题,有四根由$A,B,C,D$索引的杆(这个问题与经典问题的唯一区别)和不同直径的$N$圆盘,可以滑到任何罗根。拼图从将圆盘按尺寸递减顺序堆叠在一根杆上开始,最小的在顶部,因此近似圆锥形。谜题的目标是将整个堆栈移动到最后一根杆(由 D 索引),遵循以下规则:
一次只能移动一个磁盘。
每次移动都包括从其中一个堆栈中取出上部磁盘并将其放置在另一个堆栈的顶部或空杆上。
任何磁盘都不能放在比它小的磁盘上。
您需要计算解决问题所需的最少移动次数。
输入:
The first line is a positive integer
Next, there are
第一行是一个正整数T(1≤T≤10000),表示有T个检验数据。
接下来是T线。每行有一个正整数N(1≤N≤10000),表示每个测试数据中的车牌数。
输出:
Each test data outputs a line as a positive integer, that is, the minimum number of steps required to move all
样例输入:
5 1 2 3 4 5
样例输出:
1 3 5 9 13