結果
問題 | No.548 国士無双 |
ユーザー |
![]() |
提出日時 | 2017-07-28 22:39:24 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 76 ms / 2,000 ms |
コード長 | 265 bytes |
コンパイル時間 | 85 ms |
コンパイル使用メモリ | 7,424 KB |
実行使用メモリ | 12,288 KB |
最終ジャッジ日時 | 2024-09-17 13:28:55 |
合計ジャッジ時間 | 2,549 ms |
ジャッジサーバーID (参考情報) |
judge6 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 24 |
コンパイルメッセージ
Syntax OK
ソースコード
s=getsa=(?a..?m).map{|c| s.count(c)}res=[](?a..?m).each_with_index do |c, i|a[i]+=1two=(0..12).count{|x|a[x]==2}one=(0..12).count{|x|a[x]==1}res<<c if two==1 and one==12a[i]-=1endif res[0]puts reselseputs "Impossible"end