Comments

oh yes, thanks

For B i submitted the following code and the verdict i got was wrong answer on test 3, now when i submit the same code it got accepted, wtf is this scam codeforces??

ll n, l, t;
ll P;
cin >> n >> P >> l >> t;
ll tasks = (n % 7 == 0) ? n / 7 : n / 7 + 1;
ll tmp = tasks / 2;
ll rem_task = tasks % 2;
ll days = 0;

long long sum = t * 2 + l;
ll rem = (P % sum == 0) ? P / sum : P / sum + 1;
// cout << rem << " ";
rem = min(tmp, rem);
// cout << rem << " ";
days += rem;
P -= rem * sum;

if (P > 0 && rem_task) {
    P -= l;
    P -= t;
    days++;
}

if (P > 0) {
    if (P % l == 0)
       days += P / l;
    else
       days += P / l + 1;
}

cout << n - days << "\n";

Completely understand after reading your solution. Thanks

C's editorial is too tough to understand