using namespace std; #include #define BEGIN ios_base::sync_with_stdio(0);cin.tie(0); #define END return EXIT_SUCCESS; #define FOR(I,A,B) for(int (I)=(A);(I)<(B);++(I)) #define ALL(C) (C).begin(),(C).end() void solve() { int N;cin>>N; int A=~0; while(N--) { int M=0; int T=0; string S; FOR(i,0,4) { cin>>M; T|=1<>S; if(S=="YES")A&=T; if(S=="NO")A&=~T; } A^=(~0<<10); FOR(i,0,10) { if(A&1){cout<>=1; } } int main(int argc,char**argv) { BEGIN solve(); END }