{"trustable":true,"sections":[{"title":"Description","value":{"format":"MD","content":"给定一个序列,初始为空。现在我们将 $1$ 到 $N$ 的数字插入到序列中,每次将一个数字插入到一个特定的位置。每插入一个数字,我们都想知道此时最长上升子序列长度是多少?"}},{"title":"Input","value":{"format":"MD","content":"第一行一个整数 $N$,表示我们要将 $1$ 到 $N$ 插入序列中。\n\n接下是 $N$ 个数字,第 $k$ 个数字 $X_k$,表示我们将 $k$ 插入到位置 $X_k(0\\le X_k\\le k-1,1\\le k\\le N)$\n"}},{"title":"Output","value":{"format":"MD","content":"$N$ 行,第 $i$ 行表示 $i$ 插入 $X_i$ 位置后序列的最长上升子序列的长度是多少。"}},{"title":"Sample 1","value":{"format":"MD","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\u003e3\n0 0 2\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e1\n1\n2\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Hint","value":{"format":"MD","content":"$100\\%$ 的数据 $n\\le10^5$。"}}]}