結果
問題 |
No.829 成長関数インフレ中
|
ユーザー |
|
提出日時 | 2019-05-11 16:09:55 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
MLE
|
実行時間 | - |
コード長 | 583 bytes |
コンパイル時間 | 94 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 817,564 KB |
最終ジャッジ日時 | 2024-07-02 01:15:00 |
合計ジャッジ時間 | 3,815 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 12 MLE * 1 -- * 9 |
ソースコード
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import itertools def main(): n, b = map(int, input().split(' ')) input_list = list(map(int, input().split(' '))) result = 0 pattern_list = list(itertools.permutations(input_list, n)) for a_list in pattern_list: max_score = -1 count = 0 for each in a_list: if max_score < each: max_score = each count += 1 result += (count * (b ** count)) print(result % (10 ** 9 + 7)) if __name__ == '__main__': import sys sys.exit(main())