摘要:
一、题目描述Two players, Singa and Suny, play, starting with two natural numbers. Singa, the first player, subtracts any positive multiple of the l... 阅读全文
摘要:
一、题目描述The N cities of Estiah are connected by N-1 roads. The roads are built in a way that it’s always possible to travel between any two cit... 阅读全文
摘要:
一、题目描述We wish to tile a grid 4 units high and N units long with rectangles (dominoes) 2 units by one unit (in either orientation). For exampl... 阅读全文
摘要:
一、题目描述There is a famous railway station in PopPush City. Country there is incredibly hilly. The station was built in last century. Unfortunat... 阅读全文
摘要:
一、题目描述给定一个整数,请将该数各个位上数字反转得到一个新数。新数也应满足整数的常见形式,即除非给定的原数为零,否则反转后得到的新数的最高位数字不应为零(参见样例2)。二、输入输入共 1 行,一个整数N。-1,000,000,000 ≤ N≤ 1,000,000,000。三、输出... 阅读全文
摘要:
一、题目描述In computer science and information theory, a Huffman code is an optimal prefix code algorithm.In this exercise, please use Huffman cod... 阅读全文
摘要:
一、题目描述In the Fibonacci integer sequence, F0 = 0, F1 = 1, and Fn = Fn-1 + Fn-2 for n ≥ 2. For example, the first ten terms of the Fibonacci se... 阅读全文
摘要:
一、题目描述In the Fibonacci integer sequence, F0 = 0, F1 = 1, and Fn = Fn-1 + Fn-2 for n ≥ 2. For example, the first ten terms of the Fibonacci se... 阅读全文