結果
| 問題 |
No.794 チーム戦 (2)
|
| コンテスト | |
| ユーザー |
convexineq
|
| 提出日時 | 2021-03-18 04:02:40 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 152 ms / 1,500 ms |
| コード長 | 241 bytes |
| コンパイル時間 | 208 ms |
| コンパイル使用メモリ | 82,124 KB |
| 実行使用メモリ | 110,336 KB |
| 最終ジャッジ日時 | 2024-11-15 21:55:20 |
| 合計ジャッジ時間 | 6,020 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 32 |
ソースコード
n,k = map(int,input().split())
*a, = map(int,input().split())
a.sort()
MOD = 10**9+7
idx = 0
ans = 1
for i in range(n//2):
while idx < n and a[n-1-i] + a[idx] <= k:
idx += 1
ans *= min(idx-i,n-1-i*2)
ans %= MOD
print(ans)
convexineq