結果
| 問題 |
No.564 背の順
|
| コンテスト | |
| ユーザー |
toshiro_yanagi
|
| 提出日時 | 2018-06-05 18:36:00 |
| 言語 | Nim (2.2.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 317 bytes |
| コンパイル時間 | 3,593 ms |
| コンパイル使用メモリ | 66,332 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-30 10:00:35 |
| 合計ジャッジ時間 | 4,291 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 8 WA * 1 |
ソースコード
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.high and HN[0] < arr[i]: i += 1 echo i + 1, ["st", "nd", "rd", "th"][min(3, ($($i)[^1]).parseInt)]
toshiro_yanagi