[USACO 2010 Nov B]Race Results
题号:NC24743
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 32 M,其他语言64 M
64bit IO Format: %lld

题目描述

The herd has run its first marathon! The N (1 <= N <= 5,000) times have been posted in the form of Hours (0 <= Hours <= 99), Minutes (0 <= Minutes <= 59), and Seconds (0 <= Seconds <= 59). Bessie must sort them (by Hours, Minutes, and Seconds) into ascending order, smallest times first.
Consider a simple example with times from a smaller herd of just 3 cows (note that cows do not run 26.2 miles so very quickly):
    11:20:20
    11:15:12
    14:20:14
The proper sorting result is:
    11:15:12
    11:20:20
    14:20:14

输入描述:

* Line 1: A single integer: N
* Lines 2..N+1: Line i+1 contains cow i's time as three space-separated integers: Hours, Minutes, Seconds

输出描述:

* Lines 1..N: Each line contains a cow's time as three space-separated integers
示例1

输入

复制
3
11 20 20
11 15 12
14 20 14

输出

复制
11 15 12
11 20 20
14 20 14