結果
問題 |
No.8042 本棚
|
ユーザー |
![]() |
提出日時 | 2020-05-19 18:15:10 |
言語 | Nim (2.2.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 491 bytes |
コンパイル時間 | 3,897 ms |
コンパイル使用メモリ | 66,360 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-01 22:56:15 |
合計ジャッジ時間 | 3,951 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 |
ソースコード
import algorithm, sequtils, strutils let read* = iterator: string = while true: (for s in stdin.readLine.split: yield s) template input*(T: static[typedesc]): untyped = when T is int: read().parseInt elif T is float: read().parseFloat elif T is string: read() elif T is char: read()[0] let N = input(int) let books: seq[tuple[S, id: string]] = newSeqWith(N, (S: input(string), id: input(string))) .sortedByIt((it.S, it.id)) echo books.mapIt(it.S & " " & it.id).join("\n")