Define matrix
, if for every m(1 ≤ m ≤ n),
then matrix A can be called as partially negative matrix. Here matrix
, and {i
1,..,i
m} is a sub set of {1,..,n}.If you are not familiar with determinant of a matrix, please read the Note part of this problem.
For example, matrix
is a partially negative matrix because |-2|, |-6| and
are negative.
A symmetric matrix is a square matrix that equals to its transpose. Formally, matrix A is symmetric if A = A
T. For example,
is a symmetric matrix.
Given two N-dimensional vector x and b, and we guarantee that there will be at least
one 0 value in vector b. You task is to judge if there exists a symmetric partially
negative matrix A, which fulfills A
x = b.