#include #include using namespace std; int main(){ cout << "A="; int n;cin>>n; int A[(1< B(n); int nya = 0; for(int i = 0; (1< i; i++){ for(int j = 0; n > j; j++){ cin>>A[i][j]; } cin>>B[i]; nya += B[i]; } if(!nya){ cout << "⊥"; }else if(nya == (1< i; i++){ if(!B[i])continue; cout << "("; for(int j = 0; n > j; j++){ if(!A[i][j])cout << "¬"; cout << "P_" << j+1; if(j+1 != n)cout << "∧"; } cout << ")"; if(i+1 != n)cout << "∨"; } } cout << endl; }