#include<iostream>
#include<stack>
#include<cstring>
#include<cstdio>
#include<queue>
#include<vector>
#include<algorithm>
#define INF 0x3f3f3f3f
using namespace std; int a[]; int main(){
int n, m, k;
int ans, ret=;
scanf("%d%d%d", &n, &m, &k);
for(int i=; i<=m; ++i)
scanf("%d", &a[i]);
scanf("%d", &ans);
for(int i=; i<=m; ++i){
int tmp = ans^a[i], cnt=;
while(tmp){
if(tmp&) ++cnt;
tmp>>=;
}
if(cnt<=k) ++ret;
}
printf("%d\n", ret);
return ;
}

codeforces Fedor and New Game的更多相关文章

  1. codeforces 467B Fedor and New Game 解题报告

    题目链接:http://codeforces.com/contest/467/problem/B 题目意思:有 m + 1 个 player 和 n 种类型的 soldiers.每个player被赋予 ...

  2. 【codeforces 754D】Fedor and coupons

    time limit per test4 seconds memory limit per test256 megabytes inputstandard input outputstandard o ...

  3. codeforces 754D. Fedor and coupons

    D. Fedor and coupons time limit per test 4 seconds memory limit per test 256 megabytes input standar ...

  4. Codeforces 390Div2-754D. Fedor and coupons(贪心+优先队列)

    D. Fedor and coupons time limit per test 4 seconds memory limit per test 256 megabytes input standar ...

  5. 【Codeforces 467D】Fedor and Essay

    Codeforces 467 D 题意:给\(m​\)个单词,以及\(n​\)个置换关系,问将\(m​\)个单词替换多次后其中所含的最少的\(R​\)的数量以及满足这个数量的最短总长度 思路:首先将置 ...

  6. Codeforces Round #267 (Div. 2) D. Fedor and Essay tarjan缩点

    D. Fedor and Essay time limit per test 2 seconds memory limit per test 256 megabytes input standard ...

  7. Codeforces Round #390 (Div. 2) D. Fedor and coupons(区间最大交集+优先队列)

    http://codeforces.com/contest/754/problem/D 题意: 给定几组区间,找k组区间,使得它们的公共交集最大. 思路: 在k组区间中,它们的公共交集=k组区间中右端 ...

  8. Codeforces Round #267 (Div. 2) B. Fedor and New Game【位运算/给你m+1个数让你判断所给数的二进制形式与第m+1个数不相同的位数是不是小于等于k,是的话就累计起来】

    After you had helped George and Alex to move in the dorm, they went to help their friend Fedor play ...

  9. CodeForces 467D(267Div2-D)Fedor and Essay (排序+dfs)

    D. Fedor and Essay time limit per test 2 seconds memory limit per test 256 megabytes input standard ...

随机推荐

  1. Leetcode 107 Binary Tree Level Order Traversal II 二叉树+BFS

    题意是倒过来层次遍历二叉树 下面我介绍下BFS的基本框架,所有的BFS都是这样写的 struct Nodetype { int d;//层数即遍历深度 KeyType m;//相应的节点值 } que ...

  2. javaweb回顾第五篇浅谈会话

    1:什么是会话 通俗来说就是客户和服务器的一次私密谈话,客户发送请求以后服务器能够识别请求是来自同一个客户,他们是1对1的关系. 了解会话以后我们就要去考虑如何去实现这些问题下面一一进行解析 2:会话 ...

  3. /etc/pam.d 与 /etc/security 密码策略

    PAM(Pluggable Authentication Modules )是由Sun提出的一种认证机制.它通过提供一些动态链接库和一套统一的API,将系统提供的服务 和该服务的认证方式分开,使得系统 ...

  4. rocketmq总结

    1:角色关系 2:顺序消息 消费消息的顺序要同収送消息的顺序一致,在 RocketMQ 中,主要挃的是尿部顺序,即一类消息为满足顺序性,必须 Producer 单线程顺序収送,丏収送到同一个队列,返样 ...

  5. PHP ERROR : Call to undefined function curl_init()

    在使用PHP 的Curl方法时出现了以下错误 可能的解决办法: 在php.ini 中确保 启用了php_curl.dll组件 确保PHP版本 (PHP 4 >= 4.0.2, PHP 5, PH ...

  6. U深度利用iso文件制作U盘启动盘

    利用U盘装win10系统: 工具:U深度装机版   文件:win10.iso 步骤1:下载U深度装机版安装 步骤2:打开U深度,制作U盘启动盘,注意选择iso模式,如下图所示 接下来下一步即可,工具会 ...

  7. JS区别不同浏览器(微信、手机等)

    最近一直在忙于自己公司的旅游产品,设计方面太广并且要兼容各种设备和场景,包括PC.Mobile.Pad.还有各种支付.由于微信支付和支付宝存在竞争,所以需要区别不同的浏览器,并且WEB项目还要出现在A ...

  8. 第一章:Symfony2和HTTP基本原理

    恭喜你!通过学习Symfony2,你将用你自己的方式开发出更加高效.全面和流行的Web应用(当然,要受到用人单位或同行的欢迎,还是得靠你自己).Symfony2的存在是为了要解决最根本的问题:即提供一 ...

  9. Unity5网络模块UNet介绍

    前段时间,研究了一下UNet,经过项目实践,大致整理了下遇到的问题. 源码Bitbucket:需要说明的是,这个项目只包含上层的包装,一些低层的网络实现在Unity内部,如NetworkTranspo ...

  10. openssl - rsa加解密例程

    原文链接: http://www.cnblogs.com/cswuyg/p/3187462.html openssl是可以很方便加密解密的库,可以使用它来对需要在网络中传输的数据加密.可以使用非对称加 ...