HUST Monthly 2011.04.09

From: 2011-04-09 13:00:00 To: 2011-04-09 17:00:00 Now: 2017-09-20 00:56:35 Status: Public

E - Outline

Time Limit: 1s Memory Limit: 128MB

Submissions: 618 Solved: 84
Description

 

There is a opaque cube with 8 vertices located at

(0, 0, 0)    (0, 0, 10)    (0, 10, 0)    (0, 10, 10)

(10, 0, 0)   (10, 0, 10)   (10, 10, 0)   (10, 10, 10)

Suppose you are located in one point in space, the cube in your view should be a polygon. You are only asked to tell the number of sides of this polygon.

Input

 

The first line is an integer T, the number of cases.

The following T lines each contain three integers x, y, z ——the coordinate of your position.

You can assume that your position is strictly out side of the cube.

Output

For each case, output a line containing the number of sides of the cube’s outline.

Sample Input
2
5 5 20
20 20 20
Sample Output
4
6
Hint

Source