当前位置:网站首页>[51nod p2102] or subtraction and [bit operation]
[51nod p2102] or subtraction and [bit operation]
2022-06-13 09:35:00 【Ayane.】
analysis :
Or minus and Is XOR It can also be calculated directly
CODE:
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
#define reg register
using namespace std;
typedef long long ll;
ll a,b;
int main(){
scanf("%lld%lld",&a,&b);
printf("%lld",(a|b)-(a&b));
// printf("%lld",a^b);
return 0;
}
边栏推荐
- Jenkins access openldap user authentication
- C/S模型与P2P模型
- acwing 788. Number of pairs in reverse order
- Classes and objects -- Inheritance
- Jenkins integrates LDAP. The problem of login failure of Jenkins users caused by LDAP configuration error is solved
- LeetCode 322. Change
- VGA common resolution and calculation method
- LeetCode 剑指 Offer 30. 包含min函数的栈
- VDD,DVDD,AVDD,VCC,AFVDD,DOVDD,IOVDD
- 批量读取文件夹下的全部语音文件
猜你喜欢

C language: five custom types

IP address introduction

C language: recursive function to realize Hanoi Tower

C language: preprocessing in program environment

阿里高级专家剖析 | Protocol的标准设计

C language: deep understanding of pointers and arrays

Classes and objects -- object model and this pointer

C language: dynamic memory management

Solov2 nanny level tutorial (including environment configuration, training your own data set, code logic analysis, etc...) Updating ing

Heap
随机推荐
虚拟化和云计算文章大合集
Exercise 8-3 rotate the array to the right (20 points)
[most comprehensive and detailed explanation] detailed explanation of knapsack problem
Overloading of typical operators
全新BMW i3的操控,能符合对3系之名产品的期待吗?
Exporting MySQL data table documents using Navicat
JS【中高级】部分的知识点我帮你们总结好了
ROS2之OpenCV人脸识别foxy~galactic~humble
Overview of common layers of image recognition neural network (under update)
C language: deep understanding of character functions and string functions (1)
(state compression dp+good) acwing 291 Mondrian's dream
LeetCode 6096. 咒语和药水的成功对数(二分查找)
BGP Federation +community
Online debugging tool Arthas Foundation
LeetCode 322. Change
Resolve importerror:lib*** so--cannot open shared object file: No such... (pycharm/clion reports an error but the shell does not)
C language: file operation
LeetCode 6096. Success logarithm of spells and potions (binary search)
Classes and objects - initialization and cleanup of objects
C language: Simulated Implementation of library function strcpy
