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

Note : Do this using MAP only

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
Time Limit: 1.0 sec(s) for each input file.
Memory Limit: 256 MB
Source Limit: 1024 KB

## Contributors

Initializing Code Editor...