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 |
我觉得很简单呀,咋就是WA呢#include <iostream.h> void main() { long n,k; while(cin>>n>>k) { //cout<<n<<endl; if(n==k)cout<<1<<endl; else if(k%2==0){ cout<<1<<endl; } else if(k%2==1) { if((n-k)%2==1)cout<<0<<endl; else cout<<1<<endl; } } } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator