結果
| 問題 |
No.548 国士無双
|
| コンテスト | |
| ユーザー |
horiesiniti
|
| 提出日時 | 2017-09-15 12:31:56 |
| 言語 | Ruby (3.4.1) |
| 結果 |
AC
|
| 実行時間 | 80 ms / 2,000 ms |
| コード長 | 244 bytes |
| コンパイル時間 | 129 ms |
| コンパイル使用メモリ | 7,552 KB |
| 実行使用メモリ | 12,416 KB |
| 最終ジャッジ日時 | 2024-09-17 13:46:12 |
| 合計ジャッジ時間 | 2,626 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 24 |
コンパイルメッセージ
Syntax OK
ソースコード
# your code goes here
s="abcdefghijklm"
t=gets.chomp
h={}
s.chars{|e|
s1=s+e
s1=s1.split("").sort.join("")
h[s1]=1
}
c=0
s.chars{|e|
t1=t+e
t1=t1.split("").sort.join("")
if h.key?(t1) then
puts e
c+=1
end
}
puts "Impossible" if c==0
horiesiniti