传送门 : CF 742B

题解

异或逆运算


AC code:

/*adrui's submission
Language : C++
Result : Accepted
Lover : zyy
Favorite : Dragon Balls
Standing in the Hall of Fame
*/#include<iostream>
#include<cstring>
#include<cstring>
using namespace std;
#define ll long long
const int maxn = 100000 + 5;ll n, x, vis[maxn];int main() {//freopen("in.txt", "r", stdin);ll a;while (cin >> n >> x) {memset(vis, 0, sizeof(vis));ll ans = 0;cin >> a;vis[a] = 1;for (int i = 1; i < n; ++i) {cin >> a;ll t = x ^ a;if (t <= 100000) {//限制if (vis[t]) ans += vis[t];}++vis[a];}cout << ans << endl;}return 0;
}

CF 742 B-Arpa’s obvious problem and Mehrdad’s terrible solution相关推荐

  1. Codeforces 742B Arpa’s obvious problem and Mehrdad’s terrible solution

    http://codeforces.com/contest/742/problem/B B. Arpa's obvious problem and Mehrdad's terrible solutio ...

  2. Codeforces 742B B. Arpa’s obvious problem and Mehrdad’s terrible solution

    B. Arpa's obvious problem and Mehrdad's terrible solution time limit per test 1 second memory limit ...

  3. Codeforces 742 C Arpa's loud Owf and Mehrdad's evil plan

    题目地址:http://codeforces.com/contest/742/problem/C 题意:我看了好多别人的博客的对于题意的理解,结合他们的代码我认为这道题的意思应该是每个数要都能经过t步 ...

  4. CF - 741(C. Arpa’s overnight party and Mehrdad’s silent entering) 二分图构造

    题目链接 题意 已经给出情侣的座位编号,将两种饭分配给N对情侣.满足以下两个要求: 情侣之间不能吃相同的饭 座位号连续的三个人不能吃同一种饭 问是否存在满足的解. 思路 构造二分图 对应情侣的座位建边 ...

  5. Codeforces Round #383 (Div. 2) D. Arpa's weak amphitheater and Mehrdad's valuable Hoses —— DP(01背包)

    题目链接:http://codeforces.com/contest/742/problem/D D. Arpa's weak amphitheater and Mehrdad's valuable ...

  6. CF741D Arpa’s letter-marked tree and Mehrdad’s Dokhtar-kosh paths

    CF741D Arpa's letter-marked tree and Mehrdad's Dokhtar-kosh paths 好像这个题只能Dsu On Tree? 有根树点分治 统计子树过x的 ...

  7. Codeforces 741 D - Arpa’s letter-marked tree and Mehrdad’s Dokhtar-kosh paths

    D - Arpa's letter-marked tree and Mehrdad's Dokhtar-kosh paths 思路: 树上启发式合并 从根节点出发到每个位置的每个字符的奇偶性记为每个位 ...

  8. 【Codeforces 741 B. Arpa's weak amphitheater and Mehrdad's 】+ 并查集 + 01背包

    B. Arpa's weak amphitheater and Mehrdad's valuable Hoses time limit per test 1 second memory limit p ...

  9. Codeforces 742A Arpa’s hard exam and Mehrdad’s naive cheat 打表+水题

    A. Arpa's hard exam and Mehrdad's naive cheat time limit per test 1 second memory limit per test 256 ...

最新文章

  1. 卷积神经网络四种卷积类型
  2. 计算机网络的组成相关,计算机网络的组成
  3. [转载]细说ASP.NET Windows身份认证
  4. VMware vSphere Client WIN10安装问题
  5. 排错“未能封送类型,因为嵌入数组实例的长度与布局中声明的长度不匹配”...
  6. PHP|Yii2下通过插件进行图片处理(亲测可用)
  7. 了区块链开放平台baas_区块链开放平台 BaaS 系统开发,区块链智能合约撰写服务...
  8. jquery字符串转json
  9. 怎么解除极域课堂的控制
  10. 微型计算机上的tab作用,TAB键有什么用处
  11. matlab中常微分方法,MATLAB常微分方程
  12. 计算机工作自动化的特点,计算机内部自动化操作等特点.doc
  13. Macbook Pro上手手札
  14. 【递推】HDU -2018 母牛的故事斐波那契兔子数列
  15. JAVA实现导出mysql表结构到Word详细注解版
  16. 神经网络的具体应用实例,各种神经网络的应用
  17. 哨兵2a 波段组合_一种针对哨兵2A影像的建筑物阴影提取处理方法与流程
  18. 微信小程序(八):地图
  19. (信贷风控七)申请评分卡模型Python实现(图文+代码实现)
  20. 注册.io域名有什么好处?

热门文章

  1. 百度翻译API接口测试
  2. PS高手技能分享 你都只知道哪些?
  3. 淘宝性能自动化测试平台搭建过程
  4. Go语言WEB框架:路由注册
  5. 52730-14-0,4-Methylphenyl Tetra-O-acetyl-α-D-galactopyranoside,4-甲基苯基 四-O-乙酰基-α-D-吡喃半乳糖苷
  6. 联发科c语言笔试,联发科面试
  7. 《Mybatis 手撸专栏》第9章:细化XML语句构建器,完善静态SQL解析
  8. kfold和StratifiedKFold 用法
  9. Java语言的26个细节
  10. 2020年G3锅炉水处理考试题及G3锅炉水处理模拟考试