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:448501561 at 2013-08-13 18:56:30 > y=y%L; > __int64 t=0,s,v,r; > if(m>n) > { > v=m-n; > s=(y-x+L)%L; > if(s==0) > s+=L; > r=s%v; > while(1) > { > if(s%v==0) > break; > else if(t>0&&s%v==r) > { > flag=true; > break; > } > t++; > s+=L; > } > } > if(m<n) > { > v=n-m; > s=(x-y+L)%L; > if(s==0) > s+=L; > r=s%v; > while(1) > { > if(s%v==0) > break; > else if(t>0&&s%v==r) > { > flag=true; > break; > } > t++; > s+=L; > } > } > if(flag) > printf("Impossible\n"); > else > printf("%I64d\n",s/v); > } > return 0; > } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator