屑到连样例都过不了......请各位C++大佬帮我看一下,谢谢!

P1181 数列分段 Section I

呃,神仙不鸟我w(゚Д゚)w
by 可爱的栾BB @ 2020-07-17 12:48:50


@[FDY_ManchesterCity](/user/242193) @[血色黄昏](/user/220426) 神仙您看看
by _SkyBlue @ 2020-07-17 12:57:41


@[permanent](/user/250147) (* ̄rǒ ̄)神仙您好
by 可爱的栾BB @ 2020-07-17 13:01:31


@[permanent](/user/250147) 能帮我看看吗?(~ ̄(OO) ̄)ブ
by 可爱的栾BB @ 2020-07-17 13:02:21


@[可爱的栾BB](/user/315265) @[血色黄昏](/user/220426) 才是神仙,他是我们社长(
by _SkyBlue @ 2020-07-17 13:02:26


@[permanent](/user/250147) Σ(っ °Д °;)っ~~对于我来说你们都是神仙不是吗?〒▽〒~~
by 可爱的栾BB @ 2020-07-17 13:03:08


我这么菜,不会啊( ~~@[LPY_MakchesterCity](/user/341635) (~~
by _SkyBlue @ 2020-07-17 13:03:32


@[可爱的栾BB](/user/315265) ```cpp #include <cstdio> #include <cctype> using namespace std; template <typename T> inline void read(T& ret) { int c = getchar(); ret = 0; while(!isdigit(c)) { c = getchar(); } while(isdigit(c)) { ret = ret * 10 + c - 48, c = getchar(); } } template <typename T, typename... Args> inline void read(T& ret, Args&... args) { read(ret), read(args...); } using namespace std; int a[100002]; int main(){ int n, m; read(n, m); int ans=n+1; for(int i=1;i<=n;i++){ read(a[i]); if(a[i] + a[i-1] <= m) a[i] += a[i-1], ans = ans - 1; } printf("%d", ans); return 0; }
by _SkyBlue @ 2020-07-17 13:05:13


@[permanent](/user/250147) !@#¥%……&¥#@这啥啊我看不懂啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊(ノへ ̄、)
by 可爱的栾BB @ 2020-07-17 13:07:10


@[permanent](/user/250147) 这就是强者的世界吗(ノへ ̄、)
by 可爱的栾BB @ 2020-07-17 13:07:29


上一页 | 下一页