【链接】h在这里写链接


【题意】


给你n个问题,每个人都知道一些问题。
然后让你选择一些问题,使得每个人知道的问题的数量,不超过这些问题的数量的一半。

【题解】


想法题。
只要有两个问题。
这两个问题,每个人最多只知道其中一个。 或是有一个问题,所有人都不知道就可以了。
那么就是YES.
否则NO。

【错的次数】


0

【反思】


在这了写反思

【代码】

#include <bits/stdc++.h>
using namespace std; int n,k;
int bo[20000]; int main()
{
scanf("%d%d",&n,&k);
for (int i = 0;i < n;i++)
{
int s = 0;
for (int j = 0;j < k;j++)
{
int x;
scanf("%d",&x);
s = s*2+x;
}
bo[s] = 1;
if (s==0)
return cout << "YES"<<endl,0;
}
for (int i = 0 ;i < (1<<k);i++)
for (int j = 0;j < (1<<k);j++)
if (bo[i]&&bo[j]&&(i&j)==0)
return cout <<"YES"<<endl,0;
cout << "NO" << endl;
return 0;
}

【Codeforces Round #438 C】 Qualification Rounds的更多相关文章

  1. 【Codeforces Round #438 B】Race Against Time

    [链接]h在这里写链接 [题意] 时针.分钟.秒针走不过去. 问你从t1时刻能不能走到t2时刻 [题解] 看看时针.分钟.秒针的影响就好. 看看是不是在整时的位置就好. 然后看看影响到x不能到y; 然 ...

  2. 【Codeforces Round #438 A】Bark to Unlock

    [链接]h在这里写链接 [题意] 在这里写题意 [题解] 枚举它是在连接处,还是就是整个字符串就好. [错的次数] 0 [反思] 在这了写反思 [代码] #include <bits/stdc+ ...

  3. 【Codeforces Round 438 A B C D 四个题】

    题目所在比赛的地址在这里呀 A. Bark to Unlock ·述大意:       输入一个目标串.然后输入n(1<=n<=100)个串,询问是否可以通过这些串收尾相接或者它本身拼出目 ...

  4. Codeforces Round #438 (Div.1+Div.2) 总结

    本来兴致勃勃的想乘着这一次上紫,于是很早很早的到了机房 但是好像并没有什么用,反而rating-=47 Codeforces Round #438(Div.1+Div.2) 今天就这样匆匆的总结一下, ...

  5. 【Codeforces #312 div2 A】Lala Land and Apple Trees

    # [Codeforces #312 div2 A]Lala Land and Apple Trees 首先,此题的大意是在一条坐标轴上,有\(n\)个点,每个点的权值为\(a_{i}\),第一次从原 ...

  6. Codeforces Round #438 C - Qualification Rounds 思维

    C. Qualification Rounds time limit per test 2 seconds memory limit per test 256 megabytes input stan ...

  7. [Codeforces Round #438][Codeforces 868C. Qualification Rounds]

    题目链接:868C - Qualification Rounds 题目大意:有\(n\)个题目,\(k\)个人,每个人可能做过这\(n\)个题里的若干道,出题方要在这\(n\)个题目里选若干个出来作为 ...

  8. 【Codeforces Round 431 (Div. 2) A B C D E五个题】

    先给出比赛地址啦,感觉这场比赛思维考察非常灵活而美妙. A. Odds and Ends ·述大意:      输入n(n<=100)表示长度为n的序列,接下来输入这个序列.询问是否可以将序列划 ...

  9. 【Codeforces Round】 #432 (Div. 2) 题解

    Codeforces Round #432 (Div. 2, based on IndiaHacks Final Round 2017)  A. Arpa and a research in Mexi ...

随机推荐

  1. git stash备份当前工作区内容,回到最近一次commit提交

    git stash: 备份当前的工作区的内容,从最近的一次提交中读取相关内容,让工作区保证和上次提交的内容一致.同时,将当前的工作区内容保存到Git栈中.git stash pop: 从Git栈中读取 ...

  2. Windows 7 Ultimate with SP1(x64) MSDN 官方简体中文旗舰版原版

    Windows 7 Ultimate(旗舰版)64位功能齐全,所有其他版本所具有的高级功能它都有!它是最好的Windows 7操作系统.旗舰版很受网友欢迎,下载速度飞快. MSDN 我告诉你下载官网: ...

  3. PS中矢量形状图层的合并交叉等运算

    操作中将用到下图所示的几个按钮   图1.2 减去顶层形状图层为例 1. 上图中,选择矩形工具,以新建图层的形式,新建两个矩形的形状图层,如上右图. PS:可以Shift+A快捷键选中一个形状,然后填 ...

  4. Scala基础知识

    1.scala的变量分为可变变量和不可变变量 不可变变量: val hello = "helloworld" 可变变量的定义方法 var str2 = "我是kw!&qu ...

  5. [Debug] Chrome Devtools: Elements - Console Integration

    The Element Inspector in Chrome DevTools offers powerful integration with the console - learn how to ...

  6. Unity插件之NGUI学习(5)—— 创建Label图文混排及文字点击

    创建一个新的Scene,并按 Unity插件之NGUI学习(2)创建UI Root. 准备工作,制作Font.如今Project窗体创建一个Font目录.然后从系统自带字体目录中选择自己须要的字体,我 ...

  7. python的报错

    1;; //////////////////////////////////////////////////////////////////////////////////////////////// ...

  8. ng build --base-href的设定问题

    项目构建部署中遇到的问题: 1.不使用hash,如何解决刷新页面404的问题? 说明: root  指定项目地址路径,默认为nginx下的html index  默认访问index文件 try_fil ...

  9. 【u247】生物进化

    Time Limit: 1 second Memory Limit: 128 MB [问题描述] 在一片茂密的原始森林中,生物学家们发现了几种远古时期的动物化石.他们将化石依次编号为1,2,3,--n ...

  10. [AngularFire2] Auth with Firebase auth -- email

    First, you need to enable the email auth in Firebase console. Then implement the auth service: login ...