結果
| 問題 | No.548 国士無双 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-12-18 06:24:52 |
| 言語 | Nim (2.2.8) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 314 bytes |
| 記録 | |
| コンパイル時間 | 2,726 ms |
| コンパイル使用メモリ | 73,172 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2026-03-22 01:04:04 |
| 合計ジャッジ時間 | 3,579 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 24 |
コンパイルメッセージ
/home/judge/data/code/Main.nim(1, 8) Warning: imported and not used: 'sequtils' [UnusedImport]
ソースコード
import sequtils,strutils,algorithm,tables
template get*():string = stdin.readLine().strip()
let s = stdin.readLine.sorted(cmp)
if s.join("") == "abcdefghijklm":
echo s.join("\n")
elif s[0] < 'a' or s[^1] > 'm' or s.toCountTable().len < 12:
echo "Impossible"
else:
for c in 'a'..'m':
if c notin s : echo c