守望者的逃离题解

justin 2025-06-18 10:34:50 2025-06-18 10:41:07

#include <bits/stdc++.h>
using namespace std;
int M, S, T, maxn, ans;
int main() {
    cin >> M >> S >> T;
    for (int i = 1; i <= T; i++) {
        ans += 17;
        if (M >= 10) {
            M -= 10, maxn += 60;
        } else {
            M += 4;
        }
        ans = max(maxn, ans);
        if (ans >= S) {
            cout << "Yes\n" << i;
            return 0;
        }
    }
    cout << "No\n" << ans;
    return 0;
}