N - Co Ordinates (Pair Practice)
/
No tags
Problem
Editorial
Analytics

Note : For this question use PAIRS for taking input, and then do it, don't use map.

There are 'N' 2-D co-ordinate points given. Now , you have to print the co-ordinate point, followed by their frequencies, See sample I/O,

Print the coordinate points in the Lexicographical order.

Input :

• First line contains an integer 'N' , i.e the no. of 2-D coordinate points given.
• Next N line contains, two space separated integers x and y, defining x-coordinate and y- coordinate respectively .

Output:

• Three space separated integers, first one defines the x-coordinate, second integer define y-coordinate and third integer defines the frequency of (x,y).

Constraints:

• 1<= N <=100000
• -10^9<= x,y <=10^9
SAMPLE INPUT
5
1 1
2 1
1 3
1 1
1 3
SAMPLE OUTPUT
1 1 2
1 3 2
2 1 1
Explanation

There are 5 coordinates given .

(1,1) occurs 2 times.

(1,3) occurs 2 times.

(2,1) occurs 1 time.

Time Limit: 1.0 sec(s) for each input file.
Memory Limit: 256 MB
Source Limit: 1024 KB

## Contributors

Initializing Code Editor...