結果

問題 No.507 ゲーム大会(チーム決め)
ユーザー yuruhiyayuruhiya
提出日時 2020-08-08 13:16:09
言語 Ruby
(3.2.2)
結果
AC  
実行時間 372 ms / 3,000 ms
コード長 158 bytes
コンパイル時間 438 ms
コンパイル使用メモリ 11,176 KB
実行使用メモリ 37,048 KB
最終ジャッジ日時 2023-07-24 19:07:34
合計ジャッジ時間 6,651 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
15,116 KB
testcase_01 AC 70 ms
15,112 KB
testcase_02 AC 72 ms
15,268 KB
testcase_03 AC 72 ms
15,288 KB
testcase_04 AC 72 ms
15,116 KB
testcase_05 AC 71 ms
15,296 KB
testcase_06 AC 70 ms
15,116 KB
testcase_07 AC 362 ms
36,292 KB
testcase_08 AC 339 ms
37,048 KB
testcase_09 AC 370 ms
36,312 KB
testcase_10 AC 346 ms
36,712 KB
testcase_11 AC 324 ms
36,672 KB
testcase_12 AC 372 ms
36,828 KB
testcase_13 AC 350 ms
36,980 KB
testcase_14 AC 333 ms
36,204 KB
testcase_15 AC 345 ms
36,856 KB
testcase_16 AC 338 ms
36,804 KB
testcase_17 AC 70 ms
15,292 KB
testcase_18 AC 73 ms
15,304 KB
testcase_19 AC 74 ms
15,004 KB
testcase_20 AC 72 ms
15,152 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

eval"N,M,X,*A="+$<.read.split*?,
p A.sort!.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