{"trustable":true,"prependHtml":"\u003cstyle type\u003d\"text/css\"\u003e\n #problem-body \u003e pre {\n display: block;\n padding: 9.5px;\n margin: 0 0 10px;\n font-size: 13px;\n line-height: 1.42857143;\n word-break: break-all;\n word-wrap: break-word;\n color: #333;\n background: rgba(255, 255, 255, 0.5);\n border: 1px solid #ccc;\n border-radius: 6px;\n }\n\u003c/style\u003e\n","sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv id\u003d\"problem-body\"\u003e\n\t\u003cp\u003eGiven a sequence of \u003cb\u003eN\u003c/b\u003e pairs of integers, find the length of the \u003cb\u003elongest increasing subsequence\u003c/b\u003e of it. \r\n\u003c/p\u003e\u003cp\u003eAn \u003cb\u003eincreasing sequence\u003c/b\u003e \u003ci\u003eA\u003csub\u003e1\u003c/sub\u003e..A\u003csub\u003en\u003c/sub\u003e\u003c/i\u003e is a sequence such that for every \u003ci\u003e i \u0026lt; j\u003c/i\u003e, \u003ci\u003eA\u003csub\u003ei\u003c/sub\u003e \u0026lt; A\u003csub\u003ej\u003c/sub\u003e\u003c/i\u003e. \r\n\u003c/p\u003e\u003cp\u003eA \u003cb\u003esubsequence\u003c/b\u003e of a sequence is a sequence that appears in the same relative order, but not necessarily contiguous. \r\n\u003c/p\u003e\u003cp\u003eA pair of integers \u003ci\u003e (x\u003csub\u003e1\u003c/sub\u003e, y\u003csub\u003e1\u003c/sub\u003e)\u003c/i\u003e is less than \u003ci\u003e (x\u003csub\u003e2\u003c/sub\u003e, y\u003csub\u003e2\u003c/sub\u003e)\u003c/i\u003e \u003cb\u003eiff\u003c/b\u003e \u003ci\u003ex\u003csub\u003e1\u003c/sub\u003e \u0026lt; x\u003csub\u003e2\u003c/sub\u003e\u003c/i\u003e and \u003ci\u003e y\u003csub\u003e1\u003c/sub\u003e \u0026lt; y\u003csub\u003e2\u003c/sub\u003e\u003c/i\u003e. \r\n\r\n\u003c/p\u003e\u003ch3\u003eInput\u003c/h3\u003e\r\n\u003cp\u003eThe first line of input contains an integer \u003cb\u003e N\u003c/b\u003e (2 ≤ \u003cb\u003e N\u003c/b\u003e ≤ 100000).\r\n\u003c/p\u003e\u003cp\u003eThe following \u003cb\u003e N\u003c/b\u003e lines consist of \u003cb\u003e N\u003c/b\u003e pairs of integers \u003ci\u003e(x\u003csub\u003ei\u003c/sub\u003e, y\u003csub\u003ei\u003c/sub\u003e)\u003c/i\u003e (-10\u003csup\u003e9\u003c/sup\u003e ≤ \u003ci\u003ex\u003csub\u003ei\u003c/sub\u003e, y\u003csub\u003ei\u003c/sub\u003e\u003c/i\u003e ≤ 10\u003csup\u003e9\u003c/sup\u003e).\r\n\r\n\u003c/p\u003e\u003ch3\u003eOutput\u003c/h3\u003e\r\n\u003cp\u003eThe output contains an integer: the length of the longest increasing subsequence of the given sequence. \r\n\r\n\u003c/p\u003e\u003ch3\u003eExample\u003c/h3\u003e\r\n\r\n\u003cdiv\u003e\u003ctable class\u003d\"vjudge_sample\"\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\u003e8\r\n1 3\r\n3 2\r\n1 1\r\n4 5\r\n6 3\r\n9 9\r\n8 7\r\n7 6\r\n\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e3\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/div\u003e\r\n\n\u003c/div\u003e"}}]}