Codeforces 276D. Little Girl and Maximum XOR
来源:互联网 发布:手机直接安装linux系统 编辑:程序博客网 时间:2024/06/07 18:28
#include <stdio.h>int main(){unsigned long long l, r;unsigned long long finger = (unsigned long long)1 << 63;scanf("%I64u%I64u", &l, &r);if(l == r)finger = 0;else {while(!((l&finger) ^ (r&finger)))finger >>= 1;finger = (finger << 1) - 1;}printf("%I64u\n", finger);return 0;}我漏了第6行的强制类型转换,后来发现了这个错误。
0 0
- Codeforces 276D. Little Girl and Maximum XOR
- Codeforces 276D Little Girl and Maximum XOR (贪心)
- Codeforces 276D Little Girl and Maximum XOR 贪心+构造
- Codeforces 276D Little Girl and Maximum XOR【贪心】
- Codeforces 276D. Little Girl and Maximum XOR(模拟)
- codeforces 276D D. Little Girl and Maximum XOR(贪心+dp+数论)
- D. Little Girl and Maximum XOR(贪心)
- [CodeForces 276D] Little Girl and Maximum XOR (构造+脑洞)
- CodeForces 276 D.Little Girl and Maximum XOR(位运算)
- codeforces 276D Little Girl and Maximum XOR(区间最大异或值--技巧)【模板】
- CodeForces 276C Little Girl and Maximum Sum
- Codeforces 276C Little Girl and Maximum Sum
- codeforces 276 C. Little Girl and Maximum Sum
- Codeforces 276C Little Girl and Maximum Sum【贪心】
- 【Codeforces Round 169 (Div 2) D】【简单数位贪心】Little Girl and Maximum XOR 区间选两数使得异或值尽可能大
- Codeforces 246C Little Girl And Maximum 差分
- Little Girl and Maximum Sum
- Codeforces 276C Little Girl and Maximum Sum 线段树区间累加
- Android开发秘籍学习笔记(四)
- Java 基础 第九天
- 【数据结构】哈夫曼树
- 给mysql默认root用户设置密码
- POJ 2455 — Secret Milking Machine 网络流+二分
- Codeforces 276D. Little Girl and Maximum XOR
- 《c++ primer》 习题3.13-3.16
- MAC 隐藏属性设置方法
- 获取iOS各种文件路径
- 如何用dos命令结束进程
- [翻译中]API Guides -> Introduction -> Application Fundamentals
- C++ 位运算符
- PHP的addslashes() 函数和addcslashes()函数
- java学习避免死锁