时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 32 M,其他语言64 M
64bit IO Format: %lld
题目描述
Given three integers

,

,

. Count the number of pairs <

> (with

and

)
such that at least one of the following is true:
- (

) >

- (

) <
("and", "xor" are bit operators)
输入描述:
The first line of the input gives the number of test cases,
.
test cases follow.
For each test case, the only line contains three integers
,
and
.

输出描述:
For each test case, the only line contains an integer that is the number of pairs satisfying the condition given in the problem statement.