codeforces 868C Qualification Rounds

http://codeforces.com/contest/868/problem/C

#include <bits/stdc++.h>
#define maxs 202020
#define mme(i,j) memset(i,j,sizeof(i))
#define ll long long int
using namespace std;
bool rs[66];

int main()
{
int n,k;
while(~scanf("%d%d",&n,&k))
{
mme(rs,0);
int ans,fl=0,x;
for(int i=0;i<n;i++){
int sum=0;
for(int j=0;j<k;j++){
scanf("%d",&x);
sum|=(1<<j)*x;
}
rs[sum]=1;
}
for(int i=0;i<16;i++){
for(int j=0;j<16;j++){
if( (i&j)==0&&rs[i]&&rs[j])
fl=1;
}
}
if(fl)
puts("YES");
else puts("NO");
}
return 0;
}

• 本文已收录于以下专栏：

Google Code Jam 2010 Qualification Round 2012 Problem B && C

B题 当p=0时所有的总分都在sum1++， 当p=1时，总分>=1时在sum1++，总分==0，是无论如何都满足不了题意（坑点）； 总分>=29时是没有surprising情况的，无论p取何值...

Code Jam 2017 Qualification Round Problem C. Bathroom Stalls

Problem C. Bathroom Stalls题意A certain bathroom has N + 2 stalls in a single row; the stalls on the l...

google code jam 2011 Qualification Round 资格赛 Problem C. Candy Splitting

ProblemSean and Patrick are brothers who just got a nice bag of candy from their parents. Each piece...

VK Cup 2012 Qualification Round 2 C. String Manipulation 1.0

C. String Manipulation 1.0 time limit per test 3 seconds memory limit per test 256 megab...

VK Cup 2012 Qualification Round 2部分题解（C,D,E)

CF上的一场资格赛，有二十四小时的时间给我们做，所以为了晋级，我和队友合力弄掉了四题，而最后的E题其实也不难，后来也过了……因为A，B相对较水，所以以下只讲后三题…… contest C题： 比...

VK Cup 2015 - Qualification Round 2 C. Name Quest

A Martian boy is named s — he has got this name quite recently from his parents for his coming of ag...

URAL 1156 Two Rounds (DFS二分染色 + 分组背包)

#include #define MAX 110 int numOfTasks, numOfPairs; int numOfProblems; typedef struct Node{ int ...

814 - The Letter Carrier's Rounds

For anelectronic mail application you are to describe the SMTP-based communicationthat takes place b...

举报原因： 您举报文章：深度学习：神经网络中的前向传播和反向传播算法推导 色情 政治 抄袭 广告 招聘 骂人 其他 (最多只允许输入30个字)