結果

問題 No.1280 Beyond C
ユーザー simansiman
提出日時 2020-11-08 20:29:25
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 220 bytes
コンパイル時間 164 ms
コンパイル使用メモリ 11,528 KB
実行使用メモリ 29,384 KB
最終ジャッジ日時 2023-09-29 21:40:41
合計ジャッジ時間 4,478 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 83 ms
15,372 KB
testcase_01 AC 83 ms
15,392 KB
testcase_02 AC 83 ms
15,520 KB
testcase_03 AC 80 ms
15,304 KB
testcase_04 AC 79 ms
15,288 KB
testcase_05 AC 80 ms
15,576 KB
testcase_06 AC 81 ms
15,532 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 81 ms
15,116 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 270 ms
28,840 KB
testcase_19 AC 277 ms
29,384 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

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

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