当前位置:网站首页>Atcoder bit operation & Conclusion + formula derivation
Atcoder bit operation & Conclusion + formula derivation
2022-06-26 14:23:00 【Honestbutter-】
D- An operation & Conclusion + Formula derivation
Conclusion :
- x + y = 2 ( x x+y=2(~x~ x+y=2( x & y ) + ( x ~y~)+~(~x~ y )+ ( x ^ y ) ~y~)~ y )
- ( x (~x~ ( x & y ) ~y~)~ y ) & ( x ~(~x~ ( x ^ y ) = 0 ~y~)=0 y )=0
This question defines A N D AND AND namely &
x + y = s , x x+y=s,~x~ x+y=s, x & y = a ~y=a y=a
s = 2 a + ~s=2a+ s=2a+ ( x (~x ( x^ y ) ( 1 ) ~y~)(1) y )(1)
a a~ a & ( x ~(~x~ ( x ^ y ) = 0 ( 2 ) ~y~)=0 (2) y )=0(2)
from (1)(2) obtain : s ≥ 2 a , a s≥2a,~a~ s≥2a, a & ( s − 2 a ) = 0 (s-2a)=0 (s−2a)=0
#include<iostream>
using namespace std;
long long a,s,t;
int main()
{
cin>>t;
while(t--)
{
cin>>a>>s;
if((s>=2*a)&&(((s-2*a)&a)==0))
cout<<"Yes"<<endl;
else
cout<<"No"<<endl;
}
return 0;
}
边栏推荐
- vmware部分设置
- ArcGIS secondary development - arcpy delete layer
- Knowledge about the determination coefficient R2 and the relationship with the correlation coefficient
- Why is there always a space (63 or 2048 sectors) in front of the first partition when partitioning a disk
- Installation tutorial about origin2019
- Is expression of D
- Flex & Bison 开始
- Matplotlib common operations
- SwiftUI找回丢失的列表视图(List)动画
- Eigen(3):error: ‘Eigen’ has not been declared
猜你喜欢

Gartner 2022 Top Strategic Technology Trends Report

Matplotlib common operations

One article of the quantification framework backtrader read observer

ICML 2022 | LIMO: 一种快速生成靶向分子的新方法

Pointer

Intellij IDEA--格式化SQL文件的方法

Wechat applet Registration Guide

Usage of unique function

程序员必备,一款让你提高工作效率N倍的神器uTools

永远不要使用Redis过期监听实现定时任务!
随机推荐
Memory considerations under bug memory management
"Scoi2016" delicious problem solution
FreeFileSync 文件夹比较与同步软件
idea快捷键
Online bull Blogger
Caelus - full scene offline mixed Department solution
Experience sharing of mathematical modeling: comparison between China and USA / reference for topic selection / common skills
Installation and uninstallation of MySQL software for windows
Bug memory management
Svn commit error after deleting files locally
oracle11g数据库导入导出方法教程[通俗易懂]
Gartner 2022年顶级战略技术趋势报告
Matplotlib common operations
Exercises under insect STL string
Related knowledge of libsvm support vector machine
It is better and safer to choose which securities company to open an account for flush stock
CF676C Vasya and String
方程推导:二阶有源带通滤波器设计!(下载:教程+原理图+视频+代码)
Self created notes (unique in the whole network, continuously updated)
Intellij IDEA--格式化SQL文件的方法