結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
15,100 KB
testcase_01 AC 83 ms
15,184 KB
testcase_02 AC 80 ms
15,180 KB
testcase_03 AC 79 ms
15,360 KB
testcase_04 AC 79 ms
15,044 KB
testcase_05 AC 78 ms
15,244 KB
testcase_06 AC 79 ms
15,312 KB
testcase_07 AC 79 ms
15,124 KB
testcase_08 AC 78 ms
15,252 KB
testcase_09 AC 82 ms
15,168 KB
testcase_10 AC 339 ms
25,176 KB
testcase_11 AC 412 ms
24,832 KB
testcase_12 AC 417 ms
25,580 KB
testcase_13 AC 298 ms
20,648 KB
testcase_14 AC 538 ms
30,540 KB
testcase_15 AC 178 ms
18,868 KB
testcase_16 AC 270 ms
22,456 KB
testcase_17 AC 292 ms
20,672 KB
testcase_18 AC 140 ms
20,184 KB
testcase_19 AC 424 ms
25,000 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)
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