P16574 [CodeChef] SHOEFIT
普及-
题目描述

Read problems statements in [Mandarin Chinese], [Russian], [Vietnamese] and [Bengali] as well.

You have three shoes of the same size lying around. Each shoe is either a left shoe (represented using 0) or a right shoe (represented using 1). Given A, B, C, representing the information for each shoe, find out whether you can go out now, wearing one left shoe and one right shoe.

------ Input Format ------

  • The first line contains an integer T, the number of test cases. Then the test cases follow.
  • Each test case contains a single line of input, three integers A, B, C.

------ Output Format ------

For each test case, output in a single line the answer: 1 if it's possible to go out with a pair of shoes and 0 if not.

------ Constraints ------

$1 ≤ T ≤ 8$
$0 ≤ A, B, C ≤ 1$

----- Sample Input 1 ------
3
0 0 0
0 1 1
1 0 1
----- Sample Output 1 ------
0
1
1
----- explanation 1 ------
Test Case $1$: Since there's no right shoe, it's not possible to go out with a pair of shoes.

Test Case $2$: It's possible to go out with a pair of shoes wearing the first and last shoes.

Test Case $3$: It's possible to go out with a pair of shoes wearing the first and second shoes.

输入格式

见题面

输出格式

见题面

样例输入
3 0 0 0 0 1 1 1 0 1
样例输出
0 1 1