problem
solution
codes
//f[i]:第i秒最远可以走多远
#include<iostream>
using namespace std;
const int maxn = 300010;
int m, s, t, f[maxn];
int main(){
cin>>m>>s>>t;
for(int i = 1; i <= t; i++){ //dp
if(m >= 10){ f[i]=f[i-1]+60; m-=10; }else {f[i]=f[i-1]; m+=4;}
}
for(int i = 1; i <= t; i++){//贪心
if(f[i]<f[i-1]+17)f[i]=f[i-1]+17;
if(f[i]>=s){cout<<"Yes
"<<i<<"
"; return 0;}
}
cout<<"No
"<<f[t]<<"
";
return 0;
}