stars

TimeLimit:10000MS  MemoryLimit:32768KB
64-bit integer IO format:%I64d
未提交 | 登录后收藏
Problem Description

John loves to see the sky. A day has Q times. Each time John will find a new star in the sky, or he wants to know how many stars between (x1,y1,z1) and (x2,y2,z2).

Input

The first line contains a single integer T(1T10) (the data for Q>100 less than 6 cases),, indicating the number of test cases.
The first line contains an integer Q(1Q50000),indicating how many times in a day.
Next Q lines contain some integers, first input an integer A(1A2).If A=1 then input 3 integers x, y and z, indicating a coordinate of one star.. If A=2 then input 6 integers x1,y1,z1,x2,y2,z2(1x,y,z,x1,y1,z1,x2,y2,z2109,x1x2,y1y2,z1z2).

Output
For each “A=2”,output an integer means how many stars in such a section.
SampleInput
2
11
1 1 1 1
2 1 1 1 1 1 1
1 2 2 2
1 1 1 2
2 1 1 1 2 2 2
1 3 3 3
1 4 4 4
1 5 5 5
1 6 6 6
2 1 1 1 6 6 6
2 3 3 3 6 6 6
11
1 1 1 1
2 1 1 1 1 1 1
1 2 2 2
1 1 1 2
2 1 1 1 2 2 2
1 3 3 3
1 4 4 4
1 5 5 5
1 6 6 6
2 1 1 1 6 6 6
2 3 3 3 6 6 6
SampleOutput
1
3
7
4
1
3
7
4
Submit
题目统计信息详细
总AC数7
通过人数3
尝试人数3
总提交量12
AC率25.00%
AC该题后可以添加标签
贴完标签可以获得20ACB。
并且可以获得本题所有提交代码查看权限。
点击标题可以显示标签。
如果你还没认真思考过这题,请不要查看标签
如果您已经通过了该题,请务为该题贴上标签

T^T Online Judge

[BUG反馈] [FAQ] [闽ICP备17026590号-1]
当前版本:3.24 系统时间: