比赛 |
假期找点事儿做题吧 |
评测结果 |
AAAAAWWAWA |
题目名称 |
守望者的逃离 |
最终得分 |
70 |
用户昵称 |
Regnig Etalsnart |
运行时间 |
0.000 s |
代码语言 |
C++ |
内存使用 |
0.00 MiB |
提交时间 |
2017-06-07 09:49:55 |
显示代码纯文本
#include<cstdio>
#define syy myson
using namespace std;
int m,s,t,dist,time,i;
int Main()
{
freopen("escape.in","r",stdin);freopen("escape.out","w",stdout);
scanf("%d%d%d",&m,&s,&t);
dist=s;
while(m>=10)
{
m-=10;
time++;
dist-=60;
if(dist<=0)
{
printf("Yes\n%d",time);
return 0;
}
if(time==t)
{
int ans=s-dist;
printf("No\n%d",ans);
return 0;
}
}
if(m>=6&&t-time>=2)
{
time+=2;
dist-=60;
}
else if(m>=2&&t-time>=3)
{
time+=3;
dist-=60;
}
while(dist>=120)
{
time+=7;
dist-=120;
if(time>t)
{
int ans=s-dist+120;
printf("No\n%d",ans);
return 0;
}
if(time==t)
{
if(!dist)
{
printf("Yes\n0");
return 0;
}
else
{
int ans=s-dist;
printf("No\n%d",ans);
return 0;
}
}
}
while(dist>0)
{
time++;
dist-=17;
if(time==t)
{
int ans=s-dist;
printf("No\n%d",ans);
return 0;
}
if(dist<=0)
{
printf("Yes\n%d",time);
return 0;
}
}
printf("Yes\n%d",time);
return 0;
}
int main(){;}
int syy=Main();