結果
問題 |
No.564 背の順
|
ユーザー |
![]() |
提出日時 | 2018-06-05 23:28:23 |
言語 | Nim (2.2.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 309 bytes |
コンパイル時間 | 3,545 ms |
コンパイル使用メモリ | 66,124 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-30 10:08:48 |
合計ジャッジ時間 | 3,972 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 2 |
other | AC * 4 WA * 5 |
ソースコード
import strutils, sequtils, algorithm let HN = readLine(stdin).split.map parseInt var arr = newSeqWith(0, 0) for i in 2 .. HN[1]: arr.add readLine(stdin).parseInt arr.sort(cmp, Descending) var i = 0 while i < arr.len and HN[0] <= arr[i]: i += 1 echo i + 1, ["st", "nd", "rd", "th"][min(i.repr[^1].int, 3)]