Article From:https://www.cnblogs.com/xidian-mao/p/9688111.html

   I didn’t expect XOR to have an interesting connection with linear algebra.

           nThe number can be transformed into an upper triangular matrix (linearly independent?!!).

            

Link: https://www.nowcoder.com/acm/contest/180/D
Source: cattle net

Title Description

A has n numbers, and he asks a n interesting question: He wants to know if, for a N Y x, y, X can be changed to y by a N Y number of times or by a N Y number of times.

Input Description:

The first behavior is an integer n, which represents the number of elements.
Second lines and one line contain n integers, representing elements in a sequence respectively.
Third an integer Q, which indicates the number of inquiries.
Next, Q rows, each row has two numbers x, y, meaning as shown in the title.

Output Description:

Output Q line, if x can be converted to y, output "YES", otherwise output "NO".

Leave a Reply

Your email address will not be published. Required fields are marked *