結果

問題 No.133 カードゲーム
ユーザー gigurururugigurururu
提出日時 2015-01-22 23:25:58
言語 Ruby
(3.3.0)
結果
AC  
実行時間 73 ms / 5,000 ms
コード長 145 bytes
コンパイル時間 116 ms
コンパイル使用メモリ 11,444 KB
実行使用メモリ 15,200 KB
最終ジャッジ日時 2023-09-07 09:07:32
合計ジャッジ時間 2,539 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 67 ms
15,120 KB
testcase_01 AC 64 ms
15,180 KB
testcase_02 AC 65 ms
15,080 KB
testcase_03 AC 66 ms
15,068 KB
testcase_04 AC 66 ms
15,164 KB
testcase_05 AC 67 ms
15,068 KB
testcase_06 AC 67 ms
15,036 KB
testcase_07 AC 71 ms
15,096 KB
testcase_08 AC 67 ms
15,024 KB
testcase_09 AC 66 ms
15,096 KB
testcase_10 AC 68 ms
15,124 KB
testcase_11 AC 68 ms
15,108 KB
testcase_12 AC 69 ms
15,176 KB
testcase_13 AC 67 ms
15,180 KB
testcase_14 AC 65 ms
15,076 KB
testcase_15 AC 67 ms
15,016 KB
testcase_16 AC 70 ms
15,080 KB
testcase_17 AC 73 ms
15,032 KB
testcase_18 AC 70 ms
15,024 KB
testcase_19 AC 66 ms
15,096 KB
testcase_20 AC 65 ms
15,192 KB
testcase_21 AC 66 ms
15,200 KB
testcase_22 AC 67 ms
15,152 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

def g;gets.split.map(&:to_i)end
n,=g
a,b=g,g
t=[*a.permutation].product([*b.permutation])
p 1.0*t.count{|i,j|i.zip(j).count{|k,l|k>l}*2>n}/t.size
0