Cho dữ liệu (bạn không cần sắp xếp)
Đầu vào:
* [acme wiki instructions] (6)
* [adding a monitor to vgadb] (331)
* [background] (56)
* [blue gene port] (289)
* [books] (213)
* [broken hardware] (371)
* [compiling kernels] (8)
* [configuring a standalone cpu server] (14)
* [documentation] (261)
* [don't believe everything you read] (314)
* [staying up to date] (44)
* [summary of the plan 9 development environment] (21)
Hãy viết chương trình in chữ cái đầu tiêu đề mỗi bài viết, cho ra kết quả như sau:
Đầu ra:
A
* [acme wiki instructions] (6)
* [adding a monitor to vgadb] (331)
B
* [background] (56)
* [blue gene port] (289)
* [books] (213)
* [broken hardware] (371)
C
* [compiling kernels] (8)
* [configuring a standalone cpu server] (14)
D
* [documentation] (261)
* [don't believe everything you read] (314)
S
* [staying up to date] (44)
* [summary of the plan 9 development environment] (21)
Bình luận
Mình đang viết bằng ngôn ngữ awk chứ C thì dài lắm! Đang làm tool nhỏ tiện mang lên đây thui!