結果
問題 | No.794 チーム戦 (2) |
ユーザー | pasoconhoshii |
提出日時 | 2019-03-19 08:36:33 |
言語 | Python3 (3.11.6 + numpy 1.26.0 + scipy 1.11.3) |
結果 |
WA
|
実行時間 | - |
コード長 | 313 bytes |
コンパイル時間 | 92 ms |
コンパイル使用メモリ | 10,720 KB |
実行使用メモリ | 32,044 KB |
最終ジャッジ日時 | 2023-10-11 12:34:45 |
合計ジャッジ時間 | 10,436 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge11 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | WA | - |
testcase_02 | AC | 15 ms
8,200 KB |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | AC | 15 ms
8,192 KB |
testcase_13 | AC | 16 ms
8,112 KB |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | AC | 427 ms
30,028 KB |
testcase_17 | AC | 425 ms
30,060 KB |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | WA | - |
testcase_24 | WA | - |
testcase_25 | WA | - |
testcase_26 | WA | - |
testcase_27 | WA | - |
testcase_28 | WA | - |
testcase_29 | AC | 320 ms
17,976 KB |
testcase_30 | AC | 317 ms
16,728 KB |
testcase_31 | WA | - |
testcase_32 | WA | - |
testcase_33 | WA | - |
testcase_34 | WA | - |
ソースコード
N,K=map(int,input().split()) A=list(map(int,input().split())) from bisect import bisect_right as br A.sort() rem=[0]*(N+1) for i in range(N-1,-1,-1 ): r=K-A[i] idx=min(br(A,r),i) rem[i]=idx ans=1 mod=10**9+7 n=0 for i in range(N-1,-1,-1): ans=ans*(rem[i]-n)%mod n+=1 print(ans%mod)