結果

問題 No.989 N×Mマス計算(K以上)
ユーザー c-yanc-yan
提出日時 2020-07-30 21:08:34
言語 Ruby
(3.3.0)
結果
AC  
実行時間 536 ms / 2,000 ms
コード長 172 bytes
コンパイル時間 49 ms
コンパイル使用メモリ 11,316 KB
実行使用メモリ 30,816 KB
最終ジャッジ日時 2023-09-18 03:06:56
合計ジャッジ時間 5,212 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 88 ms
15,032 KB
testcase_01 AC 86 ms
15,264 KB
testcase_02 AC 84 ms
15,356 KB
testcase_03 AC 80 ms
15,356 KB
testcase_04 AC 80 ms
15,256 KB
testcase_05 AC 80 ms
15,324 KB
testcase_06 AC 79 ms
15,132 KB
testcase_07 AC 81 ms
15,032 KB
testcase_08 AC 79 ms
15,140 KB
testcase_09 AC 79 ms
15,268 KB
testcase_10 AC 340 ms
25,012 KB
testcase_11 AC 409 ms
24,872 KB
testcase_12 AC 413 ms
25,604 KB
testcase_13 AC 295 ms
20,724 KB
testcase_14 AC 536 ms
30,816 KB
testcase_15 AC 177 ms
18,684 KB
testcase_16 AC 272 ms
22,516 KB
testcase_17 AC 292 ms
20,724 KB
testcase_18 AC 142 ms
20,152 KB
testcase_19 AC 434 ms
25,136 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

a=ARGF.read.split
_,m,k=a.shift(3).map(&:to_i)
o=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(o,a[i])>=k}||c)}.sum
0