結果

問題 No.507 ゲーム大会(チーム決め)
ユーザー yuruhiyayuruhiya
提出日時 2020-08-08 13:11:31
言語 Ruby
(3.3.0)
結果
AC  
実行時間 458 ms / 3,000 ms
コード長 160 bytes
コンパイル時間 56 ms
コンパイル使用メモリ 7,552 KB
実行使用メモリ 33,020 KB
最終ジャッジ日時 2024-04-09 02:25:29
合計ジャッジ時間 6,523 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 95 ms
12,160 KB
testcase_01 AC 92 ms
12,160 KB
testcase_02 AC 93 ms
12,288 KB
testcase_03 AC 90 ms
12,288 KB
testcase_04 AC 91 ms
12,160 KB
testcase_05 AC 90 ms
12,160 KB
testcase_06 AC 89 ms
12,288 KB
testcase_07 AC 452 ms
32,248 KB
testcase_08 AC 434 ms
33,020 KB
testcase_09 AC 443 ms
30,540 KB
testcase_10 AC 439 ms
31,056 KB
testcase_11 AC 417 ms
31,308 KB
testcase_12 AC 458 ms
31,060 KB
testcase_13 AC 438 ms
33,012 KB
testcase_14 AC 420 ms
30,244 KB
testcase_15 AC 434 ms
31,272 KB
testcase_16 AC 429 ms
31,184 KB
testcase_17 AC 91 ms
12,160 KB
testcase_18 AC 90 ms
12,288 KB
testcase_19 AC 90 ms
12,160 KB
testcase_20 AC 89 ms
12,288 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

eval"N,M,X,*A="+$<.read.split*?,;A.sort!
p A.bsearch{|y|b=A[...q=A.index(y)]+A[q+1..];(N-3).downto(i=0).count{|j|i+=1while i<j&&X+y>=b[i]+b[j];i<j&&i+=1}<M}||-1
0