結果

問題 No.989 N×Mマス計算(K以上)
ユーザー c-yanc-yan
提出日時 2020-07-30 21:01:54
言語 Ruby
(3.3.0)
結果
AC  
実行時間 541 ms / 2,000 ms
コード長 174 bytes
コンパイル時間 64 ms
コンパイル使用メモリ 11,480 KB
実行使用メモリ 30,812 KB
最終ジャッジ日時 2023-09-18 02:54:22
合計ジャッジ時間 5,417 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 83 ms
15,108 KB
testcase_01 AC 80 ms
15,264 KB
testcase_02 AC 79 ms
15,120 KB
testcase_03 AC 80 ms
15,076 KB
testcase_04 AC 81 ms
15,304 KB
testcase_05 AC 81 ms
15,048 KB
testcase_06 AC 79 ms
15,084 KB
testcase_07 AC 79 ms
15,052 KB
testcase_08 AC 79 ms
15,080 KB
testcase_09 AC 78 ms
15,048 KB
testcase_10 AC 341 ms
24,928 KB
testcase_11 AC 416 ms
24,972 KB
testcase_12 AC 413 ms
25,396 KB
testcase_13 AC 297 ms
20,584 KB
testcase_14 AC 541 ms
30,812 KB
testcase_15 AC 178 ms
18,728 KB
testcase_16 AC 271 ms
22,348 KB
testcase_17 AC 293 ms
20,852 KB
testcase_18 AC 139 ms
19,944 KB
testcase_19 AC 419 ms
24,876 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:2: warning: assigned but unused variable - n
Syntax OK

ソースコード

diff #

a=ARGF.read.split
n,m,k=a.shift(3).map(&:to_i)
op=a.shift
b=a.shift(m).map(&:to_i)
a=a.map(&:to_i).sort
c=a.size
p b.map{|e|c-((0...c).bsearch{|i|e.send(op,a[i])>=k}||c)}.sum
0