#include #include using namespace std; int main() { int n; cin >> n; int q[5000][12] = {}, r[12] = {}; for (int i = 0; i < (1<> q[i][j]; cin >> r[i]; } cout << "A="; if (*max_element(r, r+(1< 0) cout << "∧"; if (!q[i][j]) cout << "¬"; cout << "P_" << j+1; } cout << ")"; } } } cout << endl; }