#include using namespace std; int n; int q[1<<13][15]; int r[15]; int main(void) { cin >> n; for(int i = 1; i <= (1<> q[i][j]; cin >> r[i]; } bool f0 = false, f1 = false; for(int i = 1; i <= (1<