| ||||||||||
| 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 | |||||||||
TLE !!!!!!!!!!!#include <iostream.h>
long count(unsigned long n,unsigned long m)
{
unsigned long i,t;
long num=0;
for(i=m;i<=n;i++)
{
t=i;
while(t%2==0)
{
num++;
t=t/2;
}
}
return num;
}
void main()
{
unsigned long n,k;
while(cin>>n>>k)
{
if(count(n,n-k+1)>count(k,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