{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":"\n \u003cdiv class\u003d\"ptx\" lang\u003d\"en-US\"\u003e\n 给出N个区间,将其不重叠地放在数轴上,至少需要几个数轴?\n [1, 2],[2, 3]算作重叠\n \u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\n \u003cdiv class\u003d\"ptx\" lang\u003d\"en-US\"\u003e\n Line 1: N \n \u003cbr\u003e \n \u003cbr\u003eLines 2..N+1: N个区间\n \u003c/div\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\n \u003cdiv class\u003d\"ptx\" lang\u003d\"en-US\"\u003e\n Line 1: ans\n \u003cbr\u003e \n \u003cbr\u003eLines 2..N+1: 安排方案\n \u003c/div\u003e"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cpre class\u003d\"sio\"\u003e5\n1 10\n2 4\n3 6\n5 8\n4 7\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cpre class\u003d\"sio\"\u003e4\n1\n2\n3\n2\n4\u003c/pre\u003e"}},{"title":"Hint","value":{"format":"HTML","content":"\n \u003cdiv class\u003d\"ptx\" lang\u003d\"en-US\"\u003e\n Explanation of the sample: \n \u003cbr\u003e \n \u003cbr\u003eHere\u0027s a graphical schedule for this output: \n \u003cbr\u003e \n \u003cbr\u003e\n \u003cpre\u003eTime 1 2 3 4 5 6 7 8 9 10\n\u003cbr\u003eStall 1 c1\u0026gt;\u0026gt;\u0026gt;\u0026gt;\u0026gt;\u0026gt;\u0026gt;\u0026gt;\u0026gt;\u0026gt;\u0026gt;\u0026gt;\u0026gt;\u0026gt;\u0026gt;\u0026gt;\u0026gt;\u0026gt;\u0026gt;\u0026gt;\u0026gt;\u0026gt;\u0026gt;\u0026gt;\u0026gt;\u0026gt;\u0026gt;\n\u003cbr\u003eStall 2 .. c2\u0026gt;\u0026gt;\u0026gt;\u0026gt;\u0026gt;\u0026gt; c4\u0026gt;\u0026gt;\u0026gt;\u0026gt;\u0026gt;\u0026gt;\u0026gt;\u0026gt;\u0026gt; .. ..\n\u003cbr\u003eStall 3 .. .. c3\u0026gt;\u0026gt;\u0026gt;\u0026gt;\u0026gt;\u0026gt;\u0026gt;\u0026gt;\u0026gt; .. .. .. ..\n\u003cbr\u003eStall 4 .. .. .. c5\u0026gt;\u0026gt;\u0026gt;\u0026gt;\u0026gt;\u0026gt;\u0026gt;\u0026gt;\u0026gt; .. .. ..\u003c/pre\u003eOther outputs using the same number of stalls are possible.\n \u003c/div\u003e"}}]}