{"trustable":false,"sections":[{"title":"","value":{"format":"MD","content":"(If you smiled when you see the title, this problem is for you ^_^)\nFor those who don’t know KTV, see: http://en.wikipedia.org/wiki/Karaoke_box\nThere is one very popular song called Jin Ge Jin Qu(). It is a mix of 37 songs, and is extremely\nlong (11 minutes and 18 seconds) — I know that there are Jin Ge Jin Qu II and III, and some other\nunofficial versions. But in this problem please forget about them.\nWhy is it popular? Suppose you have only 15 seconds left (until your time is up), then you should\nselect another song as soon as possible, because the KTV will not crudely stop a song before it ends\n(people will get frustrated if it does so!). If you select a 2-minute song, you actually get 105 extra\nseconds! ....and if you select Jin Ge Jin Qu, you’ll get 663 extra seconds!!!\nNow that you still have some time, but you’d like to make a plan now. You should stick to the\nfollowing rules:\n• Don’t sing a song more than once (including Jin Ge Jin Qu).\n• For each song of length t, either sing it for exactly t seconds, or don’t sing it at all.\n• When a song is finished, always immediately start a new song.\nYour goal is simple: sing as many songs as possible, and leave KTV as late as possible (since we\nhave rule 3, this also maximizes the total lengths of all songs we sing) when there are ties."}},{"title":"Input","value":{"format":"MD","content":"The first line contains the number of test cases T (T ≤ 100). Each test case begins with two positive\nintegers n, t (1 ≤ n ≤ 50, 1 ≤ t ≤ 109\n), the number of candidate songs (BESIDES Jin Ge Jin Qu)\nand the time left (in seconds). The next line contains n positive integers, the lengths of each song, in\nseconds. Each length will be less than 3 minutes — I know that most songs are longer than 3 minutes.\nBut don’t forget that we could manually “cut” the song after we feel satisfied, before the song ends.\nSo here “length” actually means “length of the part that we want to sing”.\nIt is guaranteed that the sum of lengths of all songs (including Jin Ge Jin Qu) will be strictly larger\nthan t."}},{"title":"Output","value":{"format":"MD","content":"For each test case, print the maximum number of songs (including Jin Ge Jin Qu), and the total lengths\nof songs that you’ll sing.\nExplanation:\nIn the first example, the best we can do is to sing the third song (80 seconds), then Jin Ge Jin Qu\nfor another 678 seconds.\nIn the second example, we sing the first two (30+69\u003d99 seconds). Then we still have one second\nleft, so we can sing Jin Ge Jin Qu for extra 678 seconds. However, if we sing the first and third song\ninstead (30+70\u003d100 seconds), the time is already up (since we only have 100 seconds in total), so we\ncan’t sing Jin Ge Jin Qu anymore!"}},{"title":"Sample Input","value":{"format":"MD","content":"2\n3 100\n60 70 80\n3 100\n30 69 70"}},{"title":"Sample Outp","value":{"format":"MD","content":"Case 1: 2 758\nCase 2: 3 777"}}]}