diff --git a/08xxx/08731.cpp b/08xxx/08731.cpp new file mode 100644 index 00000000..94cc906a --- /dev/null +++ b/08xxx/08731.cpp @@ -0,0 +1,27 @@ +#include +#include +using namespace std; + +void solve(void) { + int n, w; cin >> n >> w; + vector a(n); + for (int i=0; i> a[i]; + + int ans = 0, sum = 0; + for (int i=0; i= w) { + ans++; + sum = 0; + } + } + cout << ans; +} + +int main(void) { + ios::sync_with_stdio(false); + cin.tie(nullptr); + + solve(); + return 0; +} \ No newline at end of file