{"trustable":true,"prependHtml":"\u003cstyle type\u003d\"text/css\"\u003e\n section 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\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027\\\\(\u0027, right: \u0027\\\\)\u0027, display: false},\n {left: \u0027\\\\[\u0027, right: \u0027\\\\]\u0027, display: true}\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"Problem Statement","value":{"format":"HTML","content":"\r\n\u003csection\u003e\r\n\u003cp\u003eAtCoDeer the deer has \u003cvar\u003e\\(N\\)\u003c/var\u003e cards with positive integers written on them. The number on the \u003cvar\u003e\\(i\\)\u003c/var\u003e-th card \u003cvar\u003e\\((1≤i≤N)\\)\u003c/var\u003e is \u003cvar\u003e\\(a_i\\)\u003c/var\u003e.\r\nBecause he loves big numbers, he calls a subset of the cards \u003cem\u003egood\u003c/em\u003e when the sum of the numbers written on the cards in the subset, is \u003cvar\u003e\\(K\\)\u003c/var\u003e or greater.\u003c/p\u003e\r\n\u003cp\u003eThen, for each card \u003cvar\u003e\\(i\\)\u003c/var\u003e, he judges whether it is \u003cem\u003eunnecessary\u003c/em\u003e or not, as follows:\u003c/p\u003e\r\n\u003cul\u003e\r\n\u003cli\u003eIf, for any good subset of the cards containing card \u003cvar\u003e\\(i\\)\u003c/var\u003e, the set that can be obtained by eliminating card \u003cvar\u003e\\(i\\)\u003c/var\u003e from the subset is also good, card \u003cvar\u003e\\(i\\)\u003c/var\u003e is unnecessary.\u003c/li\u003e\r\n\u003cli\u003eOtherwise, card \u003cvar\u003e\\(i\\)\u003c/var\u003e is NOT unnecessary.\u003c/li\u003e\r\n\u003c/ul\u003e\r\n\u003cp\u003eFind the number of the unnecessary cards. Here, he judges each card independently, and he does not throw away cards that turn out to be unnecessary.\u003c/p\u003e\r\n\u003c/section\u003e\r\n"}},{"title":"Constraints","value":{"format":"HTML","content":"\r\n\u003csection\u003e\r\n\u003cul\u003e\r\n\u003cli\u003eAll input values are integers.\u003c/li\u003e\r\n\u003cli\u003e\u003cvar\u003e\\(1≤N≤5000\\)\u003c/var\u003e\u003c/li\u003e\r\n\u003cli\u003e\u003cvar\u003e\\(1≤K≤5000\\)\u003c/var\u003e\u003c/li\u003e\r\n\u003cli\u003e\u003cvar\u003e\\(1≤a_i≤10^9 (1≤i≤N)\\)\u003c/var\u003e\u003c/li\u003e\r\n\u003c/ul\u003e\r\n\u003c/section\u003e\r\n"}},{"title":"Partial Score","value":{"format":"HTML","content":"\r\n\u003csection\u003e\r\n\u003cul\u003e\r\n\u003cli\u003e\u003cvar\u003e\\(300\\)\u003c/var\u003e points will be awarded for passing the test set satisfying \u003cvar\u003e\\(N,K≤400\\)\u003c/var\u003e.\u003c/li\u003e\r\n\u003c/ul\u003e\r\n\u003c/section\u003e\r\n"}},{"title":"Input","value":{"format":"HTML","content":"\r\n\u003csection\u003e\r\n\u003cp\u003eThe input is given from Standard Input in the following format:\u003c/p\u003e\r\n\u003cpre\u003e\u003cvar\u003e\\(N\\)\u003c/var\u003e \u003cvar\u003e\\(K\\)\u003c/var\u003e\r\n\u003cvar\u003e\\(a_1\\)\u003c/var\u003e \u003cvar\u003e\\(a_2\\)\u003c/var\u003e ... \u003cvar\u003e\\(a_N\\)\u003c/var\u003e\r\n\u003c/pre\u003e\r\n\r\n\u003c/section\u003e\r\n"}},{"title":"Output","value":{"format":"HTML","content":"\r\n\u003csection\u003e\r\n\u003cp\u003ePrint the number of the unnecessary cards.\u003c/p\u003e\r\n\u003c/section\u003e\r\n"}},{"title":"Sample 1","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\u003e3 6\r\n1 4 3\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e1\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\r\n\u003csection\u003e\r\n\r\n\r\n\u003c/section\u003e\r\n\r\n\u003csection\u003e\r\n\r\n\r\n\u003cp\u003eThere are two good sets: {\u003cvar\u003e\\(2,3\\)\u003c/var\u003e} and {\u003cvar\u003e\\(1,2,3\\)\u003c/var\u003e}.\u003c/p\u003e\r\n\u003cp\u003eCard \u003cvar\u003e\\(1\\)\u003c/var\u003e is only contained in {\u003cvar\u003e\\(1,2,3\\)\u003c/var\u003e}, and this set without card \u003cvar\u003e\\(1\\)\u003c/var\u003e, {\u003cvar\u003e\\(2,3\\)\u003c/var\u003e}, is also good. Thus, card \u003cvar\u003e\\(1\\)\u003c/var\u003e is unnecessary.\u003c/p\u003e\r\n\u003cp\u003eFor card \u003cvar\u003e\\(2\\)\u003c/var\u003e, a good set {\u003cvar\u003e\\(2,3\\)\u003c/var\u003e} without card \u003cvar\u003e\\(2\\)\u003c/var\u003e, {\u003cvar\u003e\\(3\\)\u003c/var\u003e}, is not good. Thus, card \u003cvar\u003e\\(2\\)\u003c/var\u003e is NOT unnecessary.\u003c/p\u003e\r\n\u003cp\u003eNeither is card \u003cvar\u003e\\(3\\)\u003c/var\u003e for a similar reason, hence the answer is \u003cvar\u003e\\(1\\)\u003c/var\u003e.\u003c/p\u003e\r\n\u003c/section\u003e\r\n"}},{"title":"Sample 2","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\u003e5 400\r\n3 1 4 1 5\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e5\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\r\n\u003csection\u003e\r\n\r\n\r\n\u003c/section\u003e\r\n\r\n\u003csection\u003e\r\n\r\n\r\n\u003cp\u003eIn this case, there is no good set. Therefore, all the cards are unnecessary.\u003c/p\u003e\r\n\u003c/section\u003e\r\n"}},{"title":"Sample 3","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 20\r\n10 4 3 10 25 2\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\r\n\u003csection\u003e\r\n\r\n\r\n\u003c/section\u003e\r\n\r\n\u003csection\u003e\r\n\u003c/section\u003e\r\n"}}]}