#C2504. Unique Completion Codes

    ID: 45828 Type: Default 1000ms 256MiB

Unique Completion Codes

Unique Completion Codes

You are given an integer n and a sequence of m projects. Each project is described by a list of employee IDs.

For each project, a completion code is computed as the bitwise XOR of all the employee IDs in that project. Your task is to determine if all projects have unique completion codes. In other words, output True if no two projects result in the same completion code when computed by XORing their employee IDs, and False otherwise.

Note: The integer n is provided but is not used in the computation of the codes. It may represent some upper limit for employee IDs.

The XOR operation is defined in LaTeX as \(a \oplus b\) and is computed bitwise.

inputFormat

The input is read from stdin and is formatted as follows:

  1. The first line contains an integer n.
  2. The second line contains an integer m, the number of projects.
  3. Each of the next m lines begins with an integer k (the number of employees in the project) followed by k space-separated integers representing the employee IDs.

outputFormat

Output a single line to stdout containing either True if all computed completion codes (from the XOR of employee IDs) are unique, or False otherwise.

## sample
4
3
3 1 2 3
2 3 4
3 1 2 4
False