input T 1<=T<=100 n k 1<=n<=1e9 n<=2^k<=2^60 output 从1走到第k层,下一层的数是上一层的数×2或者×2+1,每次加上或者减去走过的数得到n 输出每行输出这一层的数,再输出加还是减 做法:可以发现每次都往×2走时e可以得到<2^k的所有奇数,然后a将最后一个改为2^k+1就可以在原来的基础上得到所有偶数 如用1,2,4,8通过加减可以得到-1,1,-3,3,-5,5,-7,7,然后1,2,4,9通过加减就可以得到…
Description In computer science, a binary tree is a tree data structure in which each node has at most two children. Consider an infinite full binary tree (each node has two children except the leaf nodes) defined as follows. For a node labelled v it…