Create 1393.cpp

This commit is contained in:
KiritoTRw 2016-05-26 07:50:47 +08:00
parent 47b8f903a6
commit d7f974c40e

63
QUSTOJ/1393.cpp Normal file
View File

@ -0,0 +1,63 @@
#include <iostream>
#include <cstdio>
using namespace std;
/**Written By Kiritow
Nov. 30th, 2015
All Rights Reserved.
*/
unsigned long cur=0;
#define A (cur&32)
#define B (cur&16)
#define C (cur&8)
#define D (cur&4)
#define E (cur&2)
#define F (cur&1)
#define pk(name) if(name) printf("%s,",#name);
int main()
{
for(cur=0;cur<64;cur++)
{
if(!A&&!B)
{
continue;
}
if(A&&D)
{
continue;
}
if(!(((A&&E)||(A&&F)||(E&&F))&&(!(A&&E&&F))))
{
continue;
}
if(!((B&&C)||(!B&&!C)))
{
continue;
}
if(!((C&&!D)||(!C&&D)))
{
continue;
}
if(!D)
{
if(E)
continue;
}
pk(A);
pk(B);
pk(C);
pk(D);
pk(E);
pk(F);
printf("\n");
}
return 0;
}