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 |
why is WA#include"stdio.h" void main() { long int m,a,b,max,min; long int k; while(scanf("%d",&m)!=EOF) { max=50001;min=-50001;k=0; while(scanf("%ld%ld",&a,&b)&&(a||b)) { if(a<=0&&b>=m){ k++; if(min<=a&&max>=b) {max=b;min=a;} } } if(k==0) printf("No solution\n"); else { printf("%ld\n",k); printf("%ld %ld\n",min,max);} } } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator