Codeforces 862C Mahmoud and Ehab and the xor
来源:互联网 发布:起床困难户闹钟软件 编辑:程序博客网 时间:2024/05/23 15:31
#include<bits/stdc++.h>using namespace std;#define fi first#define se second#define pb push_back#define CLR(A, X) memset(A, X, sizeof(A))#define bitcount(X) __builtin_popcountll(X)typedef long long LL;typedef pair<int, int> PII;const double eps = 1e-10;const int MOD = 255;const LL INF = 1e18;int dcmp(double x) { if(fabs(x) < eps) return 0; return x<0?-1:1; }const int MAXN = 1e5+5;int main() { int n, x; scanf("%d%d", &n, &x); if(n==2 && x==0) puts("NO"); else { puts("YES"); if(n == 1) printf("%d\n", x); else if(n == 2) printf("0 %d\n", x); else { int res = 0, d0 = 1<<18, d1 = 1<<19; for(int i = 1; i <= n-3; i++) { printf("%d ", i); res ^= i; } printf("%d %d %d\n", d0, d1, d0^d1^x^res); } } return 0;}
阅读全文
0 0
- Codeforces 862C. Mahmoud and Ehab and the xor
- Codeforces 862C Mahmoud and Ehab and the xor
- Mahmoud and Ehab and the xor CodeForces
- Mahmoud and Ehab and the xor CodeForces
- CF 862C Mahmoud and Ehab and the xor 构造
- codeforce 862C Mahmoud and Ehab and the xor(构造)
- Codeforces 862 C. Mahmoud and Ehab and the xor (技巧)
- Codeforces Round #435 (Div. 2) C. Mahmoud and Ehab and the xor(xor运算应用)
- 862C C. Mahmoud and Ehab and the xor XOR操作/构造
- 862C C. Mahmoud and Ehab and the xor XOR操作/构造
- CF C. Mahmoud and Ehab and the xor
- Codeforces Round #435 (Div. 2) C. Mahmoud and Ehab and the xor
- Codeforces Round #435 (Div. 2): C. Mahmoud and Ehab and the xor
- Codeforces Round #435 (Div. 2) C. Mahmoud and Ehab and the xor
- Codeforces Round #435 (Div. 2) C. Mahmoud and Ehab and the xor
- Codeforces Round #435 (Div. 2) C. Mahmoud and Ehab and the xor
- Codeforces Round #435 (Div. 2)C. Mahmoud and Ehab and the xor
- Codeforces Round #435 (Div. 2)C. Mahmoud and Ehab and the xor(异或的性质)
- The study of access restriction in Python(20170920) 访问限制
- 接口和抽象类的区别
- 【例子驱动学习】unique_ptr
- 鼠标划入显示提示框
- JavaScript基础之Node.js与http
- Codeforces 862C Mahmoud and Ehab and the xor
- C++标准库学习(三)--队列和string类
- Axure游戏原型设计实例应用(一)——Einsphoton
- LINUX下查看CPU和内存的使用情况
- 让你分分钟理解 JavaScript 闭包
- 让你的博客高逼格起来之博客专栏
- C语言(让一个直线在原地不停的旋转)
- css学习
- Unit Testing