{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"FJ and his cows enjoy playing a mental game. They write down the numbers from 1 to N (1 \u0026lt;\u003d N \u0026lt;\u003d 10) in a certain order and then sum adjacent numbers to produce a new list with one fewer number. They repeat this until only a single number is left. For example, one instance of the game (when N\u003d4) might go like this:\r\u003cbr\u003e\r\u003cbr\u003e\u003cpre\u003e 3 1 2 4\r\u003cbr\u003e 4 3 6\r\u003cbr\u003e 7 9\r\u003cbr\u003e 16\u003c/pre\u003eBehind FJ\u0027s back, the cows have started playing a more difficult game, in which they try to determine the starting sequence from only the final total and the number N. Unfortunately, the game is a bit above FJ\u0027s mental arithmetic capabilities.\r\u003cbr\u003e\r\u003cbr\u003eWrite a program to help FJ play the game and keep up with the cows."}},{"title":"Input","value":{"format":"HTML","content":"Line 1: Two space-separated integers: N and the final sum."}},{"title":"Output","value":{"format":"HTML","content":"Line 1: An ordering of the integers 1..N that leads to the given sum. If there are multiple solutions, choose the one that is lexicographically least, i.e., that puts smaller numbers first."}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e4 16\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e3 1 2 4\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Hint","value":{"format":"HTML","content":"Explanation of the sample:\r\u003cbr\u003e\r\u003cbr\u003eThere are other possible sequences, such as 3 2 1 4, but 3 1 2 4 is the lexicographically smallest."}}]}