F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

Jam's problem again

Time Limit: 5000/2500 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)
Total Submission(s): 2443    Accepted Submission(s): 859


Problem Description
Jam like to solve the problem which on the 3D-axis,given $N(1 \leq N \leq 100000)$ points $(x,y,z)(1 \leq x,y,z \leq 100000)$

If two point such as $(x_i,y_i,z_i)$ and $(x_j,y_j,z_j) \ x_i \geq x_j \ y_i \geq y_j \ z_i \geq z_j$, the bigger one level add $1$

Ask for the each level of the point.
 

Input
The first line is $T(1 \leq T \leq 15)$ means $T$ Case

For each case

The first line is $N$ means the number of Point and next there are $N$ line, each line has $(x,y,z)$
 

Output
Output with N line,each line has one number means the lever of point
 

Sample Input
1 4 10 4 7 10 6 6 8 2 5 7 3 10
 

Sample Output
1 1 0 0
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-04-26 04:40:18, Gzip enabled