結果

問題 No.1280 Beyond C
ユーザー simansiman
提出日時 2020-11-08 20:31:12
言語 Ruby
(3.3.0)
結果
AC  
実行時間 317 ms / 2,000 ms
コード長 230 bytes
コンパイル時間 102 ms
コンパイル使用メモリ 11,560 KB
実行使用メモリ 31,180 KB
最終ジャッジ日時 2023-09-29 21:40:46
合計ジャッジ時間 4,655 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
15,384 KB
testcase_01 AC 77 ms
15,396 KB
testcase_02 AC 77 ms
15,644 KB
testcase_03 AC 77 ms
15,252 KB
testcase_04 AC 81 ms
15,344 KB
testcase_05 AC 77 ms
15,624 KB
testcase_06 AC 78 ms
15,652 KB
testcase_07 AC 77 ms
15,472 KB
testcase_08 AC 78 ms
15,644 KB
testcase_09 AC 76 ms
15,556 KB
testcase_10 AC 77 ms
15,560 KB
testcase_11 AC 81 ms
15,604 KB
testcase_12 AC 77 ms
15,272 KB
testcase_13 AC 78 ms
15,612 KB
testcase_14 AC 79 ms
15,616 KB
testcase_15 AC 189 ms
23,876 KB
testcase_16 AC 150 ms
21,540 KB
testcase_17 AC 169 ms
23,624 KB
testcase_18 AC 276 ms
30,820 KB
testcase_19 AC 282 ms
31,180 KB
testcase_20 AC 317 ms
30,872 KB
testcase_21 AC 312 ms
30,932 KB
testcase_22 AC 313 ms
30,980 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

N, M, C = gets.split.map(&:to_i)
A = gets.split.map(&:to_i).sort
B = gets.split.map(&:to_i).sort

cnt = 0
A.each do |a|
  idx = B.bsearch_index { |b| a * b > C } || M
  cnt += M - idx
end

puts Rational(cnt, N * M).to_f.round(12)
0