結果
| 問題 |
No.118 門松列(2)
|
| ユーザー |
threepipes_s
|
| 提出日時 | 2016-01-03 19:54:59 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 65 ms / 5,000 ms |
| コード長 | 198 bytes |
| コンパイル時間 | 235 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 16,852 KB |
| 最終ジャッジ日時 | 2024-10-09 07:31:45 |
| 合計ジャッジ時間 | 2,332 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 26 |
ソースコード
from collections import Counter
input()
dp = [0]*3
for d in dict(Counter(list(map(int, input().split())))).values():
dp[2] += dp[1]*d
dp[1] += dp[0]*d
dp[0] += d
print(dp[2]%1000000007)
threepipes_s