No.2137 Stairs of Permutation
レベル :
/ AI推定難易度 : 1750
/ 実行時間制限 : 1ケース 2.000秒 / メモリ制限
: 512 MB / 標準ジャッジ問題
タグ : / 解いたユーザー数 43
作問者 :
taiga0629kyopro
/ テスター :
kaichou243
タグ : / 解いたユーザー数 43
作問者 :
taiga0629kyopro
/ テスター :
問題文最終更新日: 2022-10-25 02:45:26
English (AI translation)
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence.
Back to the original
yukicoder contest 369
(順位表)
の他の問題:
Problem Statement
For a permutation $P$ of $(1,2,\dots,N)$, define $f(P)$ as follows.
$f(P)=1 \le i \le N$ and $\max(P_1,P_2,\dots,P_i)=P_i$: the number of integers $i$ satisfying these conditions
Input
$N$
Output
Output the answer.
Sample
Sample 1
Input
3
Output
53
We have $f((1,2,3))^3+f((1,3,2))^3+f((2,1,3))^3+f((2,3,1))^3+f((3,1,2))^3+f((3,2,1))^3=3^3+2^3+2^3+2^3+1^3+1^3=53$.
Sample 2
Input
100
Output
549865790
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。