結果

問題 No.507 ゲーム大会(チーム決め)
ユーザー yuruhiyayuruhiya
提出日時 2020-08-08 13:10:04
言語 Ruby
(3.3.0)
結果
AC  
実行時間 470 ms / 3,000 ms
コード長 157 bytes
コンパイル時間 180 ms
コンパイル使用メモリ 7,424 KB
実行使用メモリ 32,696 KB
最終ジャッジ日時 2024-04-09 02:21:56
合計ジャッジ時間 6,869 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
外部呼び出し有り
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 91 ms
12,160 KB
testcase_01 AC 91 ms
12,160 KB
testcase_02 AC 91 ms
12,288 KB
testcase_03 AC 90 ms
12,288 KB
testcase_04 AC 90 ms
12,288 KB
testcase_05 AC 90 ms
12,160 KB
testcase_06 AC 91 ms
12,288 KB
testcase_07 AC 461 ms
31,660 KB
testcase_08 AC 447 ms
32,696 KB
testcase_09 AC 451 ms
30,392 KB
testcase_10 AC 443 ms
31,272 KB
testcase_11 AC 427 ms
31,044 KB
testcase_12 AC 470 ms
31,312 KB
testcase_13 AC 455 ms
32,548 KB
testcase_14 AC 428 ms
30,516 KB
testcase_15 AC 447 ms
31,036 KB
testcase_16 AC 445 ms
31,316 KB
testcase_17 AC 91 ms
12,160 KB
testcase_18 AC 93 ms
12,160 KB
testcase_19 AC 92 ms
12,160 KB
testcase_20 AC 90 ms
12,288 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

eval"N,M,X,*A="+`dd`.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