{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":" \n \u003cp\u003eA small frog wants to get to the other side of a river. The frog is initially located at one bank of the river (position 0) and wants to get to the other bank (position 200). Luckily, there are 199 leaves (from position 1 to position 199) on the river, and the frog can jump between the leaves. When at position p, the frog can jump to position p+1 or position p+2.\u003c/p\u003e \n \u003cp\u003eHow many different ways can the small frog get to the bank at position 200? This is a classical problem. The solution is the 201\u003csup\u003est\u003c/sup\u003e number of Fibonacci sequence. The Fibonacci sequence is constructed as follows: F\u003csub\u003e1\u003c/sub\u003e\u003dF\u003csub\u003e2\u003c/sub\u003e\u003d1;F\u003csub\u003en\u003c/sub\u003e\u003dF\u003csub\u003en-1\u003c/sub\u003e+F\u003csub\u003en-2\u003c/sub\u003e.\u003c/p\u003e \n \u003cp\u003eNow you can build some portals on the leaves. For each leaf, you can choose whether to build a portal on it. And you should set a destination for each portal. When the frog gets to a leaf with a portal, it will be teleported to the corresponding destination immediately. If there is a portal at the destination, the frog will be teleported again immediately. If some portal destinations form a cycle, the frog will be permanently trapped inside. Note that You cannot build two portals on the same leaf.\u003c/p\u003e \n \u003cp\u003eCan you build the portals such that the number of different ways that the small frog gets to position 200 from position 0 is M?\u003c/p\u003e \n "}},{"title":"Input","value":{"format":"HTML","content":" \n \u003cp\u003eThere are no more than 100 test cases.\u003c/p\u003e \n \u003cp\u003eEach test case consists of an integer M, indicating the number of ways that the small frog gets to position 200 from position 0. (0 ≤ M \u0026lt; 2\u003csup\u003e32\u003c/sup\u003e)\u003c/p\u003e \n "}},{"title":"Output","value":{"format":"HTML","content":" \n \u003cp\u003eFor each test case:\u003c/p\u003e \n \u003cp\u003eThe first line contains a number K, indicating the number of portals.\u003c/p\u003e \n \u003cp\u003eThen K lines follow. Each line has two numbers a\u003csub\u003ei\u003c/sub\u003e and b\u003csub\u003ei\u003c/sub\u003e, indicating that you place a portal at position a\u003csub\u003ei\u003c/sub\u003e and it teleports the frog to position b\u003csub\u003ei\u003c/sub\u003e.\u003c/p\u003e \n \u003cp\u003eYou should guarantee that 1 ≤ K, a\u003csub\u003ei\u003c/sub\u003e, b\u003csub\u003ei\u003c/sub\u003e ≤ 199, and a\u003csub\u003ei\u003c/sub\u003e ≠ a\u003csub\u003ej\u003c/sub\u003e if i ≠ j. If there are multiple solutions, any one of them is acceptable.\u003c/p\u003e \n \u003c/div\u003e \n "}},{"title":"Sample Input","value":{"format":"HTML","content":" \n \u003cpre\u003e0\r\n1\r\n5\u003c/pre\u003e \n "}},{"title":"Sample Output","value":{"format":"HTML","content":" \n \u003cpre\u003e2\r\n1 1\r\n2 1\r\n2\r\n1 199\r\n2 2\r\n2\r\n4 199\r\n5 5\u003c/pre\u003e \n "}}]}