|
- #include<iostream>
- #define FOR(i,a,b) for(int i=a;i<=b;i++)
- using namespace std;
- int m,s,t,f[300010],ans;
- bool flag=0;
- int main()
- {
- cin>>m>>s>>t;
- FOR(i,1,t)
- if(m>=10)f[i]=f[i-1]+60,m-=10;
- else {f[i]=f[i-1];m+=4;}
- FOR(i,1,t)
- {
- f[i]=max(f[i],f[i-1]+17);
- if(f[i]>=s && !flag)ans=i,flag=1;
- }
- if(flag)cout<<"Yes"<<endl<<ans<<endl;
- else cout<<"No"<<endl<<f[t]<<endl;
- return 0;
- }
复制代码
|
|