結果
問題 |
No.1238 選抜クラス
|
ユーザー |
![]() |
提出日時 | 2020-09-25 22:54:42 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 358 bytes |
コンパイル時間 | 526 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 17,696 KB |
最終ジャッジ日時 | 2024-06-28 07:12:04 |
合計ジャッジ時間 | 4,408 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 14 TLE * 1 -- * 21 |
ソースコード
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))