{"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":"HTML","content":"\u003cp\u003eXX和happy茶联动了!现在青春广场有编号从1到n的n个happy茶摊位,按顺序围成了一圈(n和1、n-1相邻),每个摊位都无限供应happy茶,但每个摊位的happy价格可能不一样,第i个摊位每杯happy茶的价格为a[i]元。\u003c/p\u003e\n\u003cp\u003e作为米忽悠的忠实粉丝,y佬掏出了他的全部身家T元,想喝happy茶喝到爽,他将按以下规则来买happy茶喝:\u003c/p\u003e\n\u003cp\u003e1.从1号摊位开始买,按顺序转圈圈经过1,2,...,n-1,n,1,2,...号摊位;\u003c/p\u003e\n\u003cp\u003e2.当他在某个摊位时,只要买得起这个摊位的happy茶,就会买1杯(每次到某个摊位,如果买得起,买且仅买一杯);\u003c/p\u003e\n\u003cp\u003e3.无论他有没有在一个摊位买happy茶,都会继续前往下一个摊位;\u003c/p\u003e\n\u003cp\u003e4.当他在任何一个摊位都买不起happy茶时,他会离开青春广场开始奢靡的happy茶生活。\u003c/p\u003e\n\n\u003cp\u003e\n现在问题来了,作为y佬的队友,你不忍心看y佬喝太多happy茶以导致高血糖高血压孤独终老等疾病,所以你需要计算出y佬一共买了多少杯happy茶,据此来帮y佬制定跑步计划并监督他跑步!\n\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003e第一行包含整数n和T,即摊位数量和y佬的全部身家\u003c/p\u003e\n\u003cp\u003e第二行输入n个数a[1],...,a[n],即每个摊位happy茶的价格\u003c/p\u003e\n\u003cp\u003e1 \u003c\u003dn \u003c\u003d 2e5,1 \u003c\u003d T \u003c\u003d 1e18 \u003c/p\u003e\n\u003cp\u003e1 \u003c\u003d a[i] \u003c\u003d 1e9 \u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003e输出一个整数,即y佬一共买了多少杯happy茶\u003c/p\u003e"}},{"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 38\n5 2 5\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e10\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\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 21\n2 4 100 2 6\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e6\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Note","value":{"format":"HTML","content":""}}]}