{"trustable":true,"prependHtml":"\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027\\\\(\u0027, right: \u0027\\\\)\u0027, display: false},\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"","value":{"format":"HTML","content":"A sequence of positive integers is Palindromic if it reads the same forward and \nbackward. For example:\n\u003cp\u003e23 11 15 1 37 37 1 15 11 23\u003c/p\u003e\n\u003cp\u003e1 1 2 3 4 7 7 10 7 7 4 3 2 1 1\u003c/p\u003e\n\u003cp\u003eA Palindromic sequence is Unimodal Palindromic if the values do not decrease \n up to the middle value and then (since the sequence is palindromic) do not increase \n from the middle to the end For example, the first example sequence above is \n NOT Unimodal Palindromic while the second example is.\u003c/p\u003e\n\u003cp\u003eA Unimodal Palindromic sequence is a Unimodal Palindromic Decomposition of \n an integer N, if the sum of the integers in the sequence is N. For example, \n all of the Unimodal Palindromic Decompositions of the first few integers are \n given below:\u003c/p\u003e\n\u003cp\u003e1: (1) \u003cbr\u003e\n 2: (2), (1 1)\u003cbr\u003e\n 3: (3), (1 1 1)\u003cbr\u003e\n 4: (4), (1 2 1), (2 2), (1 1 1 1)\u003cbr\u003e\n 5: (5), (1 3 1), (1 1 1 1 1)\u003cbr\u003e\n 6: (6), (1 4 1), (2 2 2), (1 1 2 1 1), (3 3), (1 2 2 1), ( 1 1 1 1 1 1)\u003cbr\u003e\n 7: (7), (1 5 1), (2 3 2), (1 1 3 1 1), (1 1 1 1 1 1 1)\u003cbr\u003e\n 8: (8), (1 6 1), (2 4 2), (1 1 4 1 1), (1 2 2 2 1), (1 1 1 2 1 1 1), ( 4 4), \n (1 3 3 1), (2 2 2 2), (1 1 2 2 1 1), (1 1 1 1 1 1 1 1)\u003c/p\u003e\n\u003cp\u003eWrite a program, which computes the number of Unimodal Palindromic Decompositions \n of an integer.\u003cbr\u003e\n\u003c/p\u003e\n\u003cp\u003e\u003cbr\u003e\n \u003cb\u003e Input\u003c/b\u003e\u003c/p\u003e\n\u003cp\u003eInput consists of a sequence of positive integers, one per line ending with \n a 0 (zero) indicating the end.\u003cbr\u003e\n \u003cbr\u003e\n \u003cbr\u003e\n \u003cb\u003e Output\u003c/b\u003e\u003c/p\u003e\n\u003cp\u003eFor each input value except the last, the output is a line containing the input \n value followed by a space, then the number of Unimodal Palindromic Decompositions \n of the input value. \u003c/p\u003e\n\u003cp\u003e\u003cbr\u003e\n \u003cb\u003eSample Input\u003c/b\u003e\u003c/p\u003e\n\u003cp\u003e2\u003cbr\u003e\n 3\u003cbr\u003e\n 4\u003cbr\u003e\n 5\u003cbr\u003e\n 6\u003cbr\u003e\n 7\u003cbr\u003e\n 8\u003cbr\u003e\n 10\u003cbr\u003e\n 23\u003cbr\u003e\n 24\u003cbr\u003e\n 131\u003cbr\u003e\n 213\u003cbr\u003e\n 92\u003cbr\u003e\n 0\u003c/p\u003e\n\u003cp\u003e\u003cbr\u003e\n \u003cb\u003eSample Output\u003c/b\u003e\u003c/p\u003e\n\u003cp\u003e2 2\u003cbr\u003e\n 3 2\u003cbr\u003e\n 4 4\u003cbr\u003e\n 5 3\u003cbr\u003e\n 6 7\u003cbr\u003e\n 7 5\u003cbr\u003e\n 8 11\u003cbr\u003e\n 10 17\u003cbr\u003e\n 23 104\u003cbr\u003e\n 24 199\u003cbr\u003e\n 131 5010688\u003cbr\u003e\n 213 1055852590\u003cbr\u003e\n 92 331143\u003cbr\u003e\n\u003c/p\u003e\n"}}]}