codeforces round #438 C. Qualification Rounds

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

想到用二进制去枚举每一行的状态,若存在两个二进制数相与等于0,则输出yes

#include
#include
#include
#include
#define maxn 100005
using namespace std;
int a[16];
int main()
{
	int n,k;
	int t,sum,m;
	while(cin>>n>>k)
	{
		memset(a,0,sizeof(a));
		for(int i=0;i>t;
				sum+=t*m;
				m/=2;		
			}
			a[sum]++;
		}
		int flag=0;
		for(int i=0;i<(1<

你可能感兴趣的:(acm)