#include #include using namespace std; int main(){ int N;bool top=true,btm=true; cin >> N; vector> Q((1<(N,0)); vector R((1<> Q.at(k).at(id);} cin >> R[k]; top&=R[k];btm&=~R[k]; } //output cout << "A="; if(top)cout << "⊤" <0)cout << "∨"; cout << "("; for(int id=0;id0)cout << "∧"; cout << ( Q[k][id] ?"":"¬") << "P_" << id+1; } cout << ")"; } } return 0; }