{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eNowadays spaceships are never launched from the Earth\u0027s surface. There is a huge spaceport placed in the \r\ngeostationary orbit and connected to the Earth with carbon nanotube cables. People and cargo are delivered to the \r\norbit by elevators moving along these cables. It turned out that the space elevator is much more comfortable and cheaper than a spaceship.\u003c/div\u003e\u003c/div\u003e\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eTomorrow a group of key employees of the “Akross” corporation will go to \r\nthe spaceport with a secret mission. The spaceport management has \r\nreserved a special double elevator for the group. The Head of \r\n“Akross” demanded that at any given time the total importance of staff \r\nin the elevator must not exceed some fixed value. Under this condition, \r\neven in case of fatal accident the corporation will be able to recover. \r\nEmployees enter the elevator in turns. The elevator is sent up if \r\ntwo people entered, or if only one person entered and the following person \r\nbehind him is so significant for the corporation that it is impossible to \r\nsend them together in one elevator.\u003c/div\u003e\u003c/div\u003e\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eThe spaceport management wants to know the maximum number of elevator runs required to deliver all employees, so the right amount of oxygen cylinders and charged batteries can be prepared in advance.\u003c/div\u003e\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eThe first line contains integers \u003ci\u003en\u003c/i\u003e and \u003ci\u003es\u003c/i\u003e that are the amount of \r\nemployees of “Akross” assigned to the mission, and the maximum total \r\nimportance of two employees which can go together in the \r\nelevator (1 ≤ \u003ci\u003en\u003c/i\u003e ≤ 10\u003csup\u003e5\u003c/sup\u003e; 1 ≤ \u003ci\u003es\u003c/i\u003e ≤ 10\u003csup\u003e9\u003c/sup\u003e). \r\nThe second line contains integers \u003ci\u003ev\u003c/i\u003e\u003csub\u003e1\u003c/sub\u003e, …, \u003ci\u003ev\u003c/i\u003e\u003csub\u003e\u003ci\u003en\u003c/i\u003e\u003c/sub\u003e that are the \r\nimportance of the employees (1 ≤ \u003ci\u003ev\u003c/i\u003e\u003csub\u003e\u003ci\u003ei\u003c/i\u003e\u003c/sub\u003e ≤ \u003ci\u003es\u003c/i\u003e). \u003c/div\u003e\u003c/div\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eIn the first line output the maximum amount of trips of the elevator. In \r\nthe second line output the importance of staff in order from the first \r\nemployee in the line to the last, for which the elevator will do this \r\namount of trips. If there are several possible answers, output any of \r\nthem. \u003c/div\u003e\u003c/div\u003e"}},{"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\u003e6 6\r\n1 2 3 3 4 5\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e5\r\n2 5 1 3 4 3\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}