結果

問題 No.1238 選抜クラス
ユーザー c-yanc-yan
提出日時 2020-09-25 22:54:42
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 358 bytes
コンパイル時間 555 ms
コンパイル使用メモリ 10,592 KB
実行使用メモリ 12,300 KB
最終ジャッジ日時 2023-09-10 16:05:06
合計ジャッジ時間 4,416 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
12,300 KB
testcase_01 AC 15 ms
7,772 KB
testcase_02 AC 15 ms
7,732 KB
testcase_03 AC 15 ms
7,808 KB
testcase_04 AC 15 ms
7,832 KB
testcase_05 AC 15 ms
7,820 KB
testcase_06 AC 15 ms
7,828 KB
testcase_07 AC 15 ms
7,900 KB
testcase_08 AC 15 ms
7,784 KB
testcase_09 AC 21 ms
7,864 KB
testcase_10 AC 15 ms
7,820 KB
testcase_11 AC 18 ms
7,812 KB
testcase_12 AC 15 ms
7,760 KB
testcase_13 AC 15 ms
7,856 KB
testcase_14 AC 15 ms
7,920 KB
testcase_15 AC 19 ms
7,776 KB
testcase_16 AC 18 ms
7,772 KB
testcase_17 TLE -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

def f(i, scores, peoples):
    result = 0
    for j in range(i, N):
        if (A[j] + scores) // (peoples + 1) < K:
            break
        #print(A[j] + scores, peoples + 1)
        result += 1
        result += f(j + 1, A[j] + scores, peoples + 1)
    return result

N, K, *A = map(int, open(0).read().split())

A.sort(reverse = True)
print(f(0, 0, 0))
0