![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
CCPC
Sensente
满船清梦压星河
展开
-
杭电5969 最大的位或
URL:http://acm.hdu.edu.cn/showproblem.php?pid=5969题目大意:给定两个数字LR求L~R中任意两个数字最大的位或。解题思路:将L、R转换成二进制,从最高位开始向最低位扫描,如果相同且为1则加上2^k否则遇到不相同的直接将该位后的所有位均补1(2^k -1)加上即可。AC代码:#include <iostream>#include <cstring>#include <cmath>..原创 2020-09-24 18:28:25 · 133 阅读 · 0 评论 -
杭电6543 Can you raed it croretcly?
HDU 6543http://acm.hdu.edu.cn/showproblem.php?pid=6543题目大意:判断两字符串,要是相等就Equal 否则第一位和最后一位相等且所用字符全部相同就输出Yes 其余情况全部输出NOAC代码:#include<iostream>#include<cmath>#include <cstri...原创 2019-06-10 15:20:49 · 256 阅读 · 0 评论 -
2019CCPC网络预选(部分)
A.^&^http://acm.hdu.edu.cn/showproblem.php?pid=6702题目大意:求C使得(AxorC)&(BxorC)最小。即求C = A & B,特别注意如果C=0输出1.AC代码:#include <iostream>#include <queue>#include <a...原创 2019-08-24 21:56:18 · 292 阅读 · 0 评论