SORT2D - 2D-SORT
Given n points in a two dimensional space, sort all the points in ascending order.
(x1,y1) > (x2,y2) if and only if (x1>x2) or (x1==x2 && y1<y2)
The first line consists of an integer t, the number of test cases. Then for each test case the first line consists of an integer n, the number of points. Then the next n lines contains two integers xi, yi which represents the point.
For each test case print the sorted order of the points.
NOTE: Strict time limit. Prefer scanf/printf/BufferedReader instead of cin/cout/Scanner.
[misleading spoiler]! AC in 0.4 sec 1GO
Use printf and scanf and also make sure that use std::sort and comp(point p1,point p2)
HI I AM NOT UNDERSTANDING THE QUESTION
getting tle..help plzz..i have done using structure and selection sort
@Prakash: use scanf and printf instead of cin and cout
i am getting AC on my system but here it shows WA at 0.73sec. i have used pair<> and sort() from STL..Reply soon..