結果
| 問題 | No.829 成長関数インフレ中 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-05-11 16:38:30 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
MLE
|
| 実行時間 | - |
| コード長 | 600 bytes |
| 記録 | |
| コンパイル時間 | 410 ms |
| コンパイル使用メモリ | 20,696 KB |
| 実行使用メモリ | 1,307,608 KB |
| 最終ジャッジ日時 | 2026-03-23 05:11:08 |
| 合計ジャッジ時間 | 3,597 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 12 MLE * 2 -- * 8 |
ソースコード
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import itertools
import sys
def main():
n, b = map(int, input().split(' '))
input_list = list(map(int, sys.stdin.readline().strip().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__':
sys.exit(main())