| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
Re:我的怎么错了 有什么特殊的地方?In Reply To:我的怎么错了 有什么特殊的地方? Posted by:sunwen at 2007-09-23 15:53:25 #include<stdio.h>
int main()
{
int A,B,a,b,P,flag1,flag2;
while(scanf("%d%d%d%d%d",&A,&a,&B,&b,&P)!=EOF)
{
if(a<=0||P<=0||A<=0||B<=0||b<=0)
{
printf("No\n");
return 0;
}
if(a>=A||b>=B)
{
printf("No\n");
return 0;
}
if(A>P||B>P)
{
printf("No\n");
return 0;
}
if(A>B)
{
flag1=2*(P-A);
flag2=2*(A-a);
if(flag1>=2*B||flag2>=2*B)
printf("Yes\n");
else
printf("No\n");
}
else
{
flag1=2*(P-B);
flag2=2*(B-b);
if(flag1>=2*A||flag2>=2*A)
printf("Yes\n");
else
printf("No\n");
}
}
return 0;
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator