当前位置:网站首页>[51nod] 3047 displacement operation
[51nod] 3047 displacement operation
2022-06-24 02:49:00 【SSL_ GYX】
Displacement calculation

Their thinking
Strange judgment .
hold b b b The back of 0 0 0 Empty , if b b b yes a a a The string of , Then we can achieve by displacement .
code
#include<iostream>
#include<cstdio>
using namespace std;
int n;
int main()
{
cin>>n;
while(n--)
{
int a,b,flg=0;
scanf("%d%d",&a,&b);
if(!b)
{
printf("Yes\n");
continue;
}
while(!(b&1)&&b) b>>=1;
while(a>=b)
{
int t=a^b;
if(((a&b)==b)&&((t&-t)>b||!t))
{
flg=1;
break;
}
a>>=1;
}
printf("%s\n",(flg?"Yes":"No"));
}
}
边栏推荐
- Why enterprises need fortress machines
- How to enable IPv6 network access for personal broadband
- JMeter script FAQs
- IOS development - multithreading - thread safety (3)
- Mutual conversion between qstring and qdatetime
- Crawler series: using API
- The technical route is based on UE4 for secondary development
- Is the server connected to the fortress machine a virtual machine? What if the fortress machine IP is not connected
- Coding helps Jiangsu high-speed information to achieve organizational agility and R & D agility, leading the new infrastructure of Intelligent Transportation
- [Tencent cloud double 12.12] from 56 yuan! New users of Tencent cloud buy for the first time, which is more cost-effective!
猜你喜欢

Permission maintenance topic: domain controller permission maintenance

2022-2028 global third-party data platform industry research and trend analysis report

2022-2028 global anti counterfeiting label industry research and trend analysis report

2022-2028 Global Industry Survey and trend analysis report on portable pressure monitors for wards

2022-2028 global portable two-way radio equipment industry research and trend analysis report

2022-2028 global tungsten copper alloy industry research and trend analysis report

2022-2028 global medical coating materials industry research and trend analysis report

2022-2028 global indoor pressure monitor and environmental monitor industry research and trend analysis report

2022-2028 global cancer biopsy instrument and kit industry research and trend analysis report

What is etcd and its application scenarios
随机推荐
Tencent dongzhiqiang: network security construction needs to change from product driven to service driven
Deep and shallow copy
How to quickly handle third-party login and easy to expand?
Initial experience of creating partitioned tables under MySQL cases tdsql for MySQL (I)
The whole procurement process of the procurement mall website in the transportation industry is electronic to reduce the procurement cost
Mysql Find_ IN_ Set function
How to choose the appropriate configuration server?
How to apply for top-level domain names? What are the types of top-level domain names?
How to strengthen prison security measures? Technologies you can't imagine
How to build your own cloud game server and what are the building steps
Cloudpods golang practice
Uipickerview show and hide animation
Buddha's foot before examination: the first bullet of leetcode
[supply chain • case] Tianneng group: the key to understanding the leading battery manufacturer to achieve the first profit fault
Go language starts again, go modules' past life, present life and basic use
Buddha's foot before examination: the third bullet of leetcode
The most comprehensive arrangement of safe operation solutions from various manufacturers
Engineer culture: why doesn't bat call the boss
Permission maintenance topic: domain controller permission maintenance
What is the meaning of scdo? Is it comparable to bGH