ecnu 2019 Bit operation

Posted taming

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ecnu 2019 Bit operation相关的知识,希望对你有一定的参考价值。

#include<bits/stdc++.h>
using namespace std;

unsigned int encrypt(unsigned int x){
    unsigned int low=x>>16,up=x<<16;
    low=((~low)<<16)>>16;
    up=up^(low<<16);
    return low|up;
}

int main(){
    unsigned int u;
    while(~scanf("%d",&u)){
        printf("%.2X
",encrypt(u));
    }
}

 

以上是关于ecnu 2019 Bit operation的主要内容,如果未能解决你的问题,请参考以下文章

CF339D Xenia and Bit Operations(线段树)

Convert PadLeft Bit Operate

D - Xenia and Bit Operations

Bit Operation (Message Compression/Decompression)

[线段树]Codeforces 339D Xenia and Bit Operations

位操作Bit Operation算法题