{"trustable":false,"prependHtml":"\u003cstyle type\u003d\u0027text/css\u0027\u003e\n .input, .output {\n border: 1px solid #888888;\n }\n .output {\n margin-bottom: 1em;\n position: relative;\n top: -1px;\n }\n .output pre, .input pre {\n background-color: #EFEFEF;\n line-height: 1.25em;\n margin: 0;\n padding: 0.25em;\n }\n \u003c/style\u003e\n \u003clink rel\u003d\"stylesheet\" href\u003d\"//codeforces.org/s/96598/css/problem-statement.css\" type\u003d\"text/css\" /\u003e\n\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027$$$$$$\u0027, right: \u0027$$$$$$\u0027, display: true},\n {left: \u0027$$$\u0027, right: \u0027$$$\u0027, display: false},\n {left: \u0027$$\u0027, right: \u0027$$\u0027, display: true},\n {left: \u0027$\u0027, right: \u0027$\u0027, display: false}\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"","value":{"format":"MD","content":"TXT 在嵙嵙的又一个学年到来了,很多学生都在做测试。\n\n今年 TXT 偷偷担任考官,去测试$n(1\\leqslant n\\leqslant 100000)$位新生。新生们将按照$1$到$n$的顺序依次测试。考试规则如下。\n\n- 第$i$个新生随机抽取一张标签,上面有题目。\n\n- 如果这个新生认为这个题目太难,TA 选择不做这个题目直接滚蛋,那么显然 TA 这次考试不及格。\n\n- 如果这个考生发现题目很容易,并且刚好用了 $t_i$ 分钟完成了这道题目。那么 TA 将带着得到的考试分数回家。\n\n新生们按固定顺序依次没有中断地测试。在任何时刻,TXT 总是从一个新生那里得到答案。\n\n所有新生的考试时间的总和是$M(1\\leqslant M\\leqslant 100)$,其中保证$\\max t[i]\\leqslant M$,所以,成绩不好的学生更有可能花光时间以通过考试。\n\n对于每个新生 $i$ ,TA 的任务是当 TA 通过考试时,计算出前面最少的不及格的学生的人数。\n\n例如以下样例一:\n前5个学生做完题目所需要的时间刚好等于M,所以,他们都不需要不及格的人,所以最少的不及格人数是0。而为了让第6和第7个学生通过测试,前面分别必须让第3,4和第2,5,6个学生不及格。\n"}},{"title":"Input","value":{"format":"MD","content":"输入格式的第一行包含两个整数 $ n $ 和 $ M $ ( $ 1 \\le n \\le 2 \\cdot 10^5 $ , $ 1 \\le M \\le 2 \\cdot 10^7 $ ) - 分别是学生人数和考试总时长(分钟)。\n\n输入的第二行包含 n 个整数 $ t_i $ ( $ 1 \\le t_i \\le 100 $ ) - 第 i 个学生答卷的时间,以分钟为单位。\n\n保证所有 $ t_i $ 的值都不大于 $ M $ ."}},{"title":"Output","value":{"format":"MD","content":"打印 $ n $ 个数字:第 $ i $ 个数字必须等于必须离开考试的最少学生人数,以便第 $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\u003e7 15\n1 2 3 4 5 6 7\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e0 0 0 0 0 2 3 \u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Sample 2","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\u003e5 100\n80 40 40 40 60\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e0 1 1 2 3 \u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Note","value":{"format":"MD","content":"\u003cp\u003eThe explanation for the example 1.\u003c/p\u003e\n\u003cp\u003ePlease note that the sum of the first five exam times does not exceed $M\u003d15$ (the sum is $1+2+3+4+5\u003d15$). Thus, the first five students can pass the exam even if all the students before them also pass the exam. In other words, the first five numbers in the answer are $0$.\u003c/p\u003e\n\u003cp\u003eIn order for the $6$-th student to pass the exam, it is necessary that at least $2$ students must fail it before (for example, the $3$-rd and $4$-th, then the $6$-th will finish its exam in $1+2+5+6\u003d14$ minutes, which does not exceed $M$).\u003c/p\u003e\n\u003cp\u003eIn order for the $7$-th student to pass the exam, it is necessary that at least $3$ students must fail it before (for example, the $2$-nd, $5$-th and $6$-th, then the $7$-th will finish its exam in $1+3+4+7\u003d15$ minutes, which does not exceed $M$).\u003c/p\u003e"}}]}