結果
問題 |
No.412 花火大会
|
ユーザー |
![]() |
提出日時 | 2023-03-09 00:34:27 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 397 bytes |
コンパイル時間 | 314 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-09-18 02:40:57 |
合計ジャッジ時間 | 1,681 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 15 WA * 3 |
ソースコード
B,C,D=map(int,input().split()) N=int(input()) A=list(map(int,input().split())) A.sort() DP=[1,0,0,0] for a in A: NDP=DP[:] if a>=B: NDP[1]+=DP[0] else: NDP[0]+=DP[0] if a>=C: NDP[2]+=DP[1] else: NDP[1]+=DP[1] if a>=D: NDP[3]+=DP[2] else: NDP[2]+=DP[2] NDP[3]+=DP[3] DP=NDP #print(DP) print(DP[-1])