Submission

Status:

PPPPPPPPPPPPPPPPxPPP

Subtask/Task Score:

95/100

Score: 95

User: Kei

Problemset: Slowly Express

Language: cpp

Time: 0.093 second

Submitted On: 2026-10-08 16:39:02

#include<iostream>
#include<iomanip>
#include<algorithm>
#include<vector>
using namespace std;
using ll = long long;
using pii = pair<int,int>;


void solve(){
    int curw=0,curd=0;
    int recv;
    cin>>recv;
    vector<int> days;
    while(recv!=-1){
        curw+=recv;
        while(curw>=800){
            curw-=800;
            curd++;
        }
        while(curw>=500){
            curw=0;
            curd++;
        }
        days.push_back(curd);
        curd=0;
        cin >> recv;
    }
    for(int& x : days){
        cout << x << '\n';
    }

}

int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    solve();
    return 0;
}