1 条题解
-
0Tabing010102 (tabing) LV 0 MOD @ 2019-11-23 15:41:54
std from xhz
//std from xhz #include<iostream> #include<cstdio> int main(){ // freopen("in9.txt","r",stdin); // freopen("out9.txt","w",stdout); int m,s,t; int sh=0,th=0; scanf("%d%d%d",&m,&s,&t); while (sh<s && th<t){ if (m>=10){ m=m-10; sh=sh+60; th++; } else if (t-th==1){ sh=sh+17; th++; } else if (m<6 && t-th==2){ sh=sh+17; th++; } else if (m>=2){ m=m+4; th++; } else if (s-sh>=120 && t-th>=7){ int k=(s-sh)/120; if (k>(t-th)/7) k=(t-th)/7; sh=sh+120*k; th=th+7*k; } else{ sh=sh+17; th++; } } if (sh>=s) printf("Yes\n%d",th); else printf("No\n%d",sh); }
- 1
信息
- ID
- 1032
- 难度
- 8
- 分类
- (无)
- 标签
- (无)
- 递交数
- 57
- 已通过
- 8
- 通过率
- 14%
- 上传者