結果
問題 | No.133 カードゲーム |
ユーザー |
|
提出日時 | 2016-01-21 06:02:34 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 93 ms / 5,000 ms |
コード長 | 215 bytes |
コンパイル時間 | 193 ms |
コンパイル使用メモリ | 7,552 KB |
実行使用メモリ | 12,416 KB |
最終ジャッジ日時 | 2024-06-25 03:41:25 |
合計ジャッジ時間 | 3,216 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 19 |
コンパイルメッセージ
Syntax OK
ソースコード
N = gets.to_iA = gets.split.map(&:to_i)B = gets.split.map(&:to_i)n = 0d = 0B.permutation do |b|w = A.zip(b).select{|a| a[0] > a[1]}.sizel = N - wn += 1 if w > ld += 1endputs Rational(n, d).to_f