結果
問題 | No.548 国士無双 |
ユーザー |
|
提出日時 | 2017-07-28 22:30:54 |
言語 | Python2 (2.7.18) |
結果 |
AC
|
実行時間 | 13 ms / 2,000 ms |
コード長 | 388 bytes |
コンパイル時間 | 397 ms |
コンパイル使用メモリ | 6,912 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-17 12:59:00 |
合計ジャッジ時間 | 1,400 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 24 |
ソースコード
from collections import CounterA = set(list("abcdefghijklm"))S = raw_input()if len(set(S) - A) > 0:print "Impossible"exit()C = Counter(S)if sorted(C.values()) == [1 for _ in xrange(13)]:for i in sorted(list(A)):print ielif sorted(C.values()) == [1] * 11 + [2]:for i in A:if i not in C.keys():print ielse:print "Impossible"