Codeforces combinatorics problem (short statement) rated 1700 HELP

Правка en2, от btme, 2020-12-04 12:12:28

Let n be an integer. Consider all permutations on integers 1 to n in lexicographic order, and concatenate them into one big sequence p. For example, if n=3, then p=[1,2,3,1,3,2,2,1,3,2,3,1,3,1,2,3,2,1] . You are given n. Find the number of subarrays of p of length n having sum n(n+1)2. Since this number may be large, output it modulo 998244353 problem link

 I AM NOT ABLE TO GET THE PART WHICH I HAVE MARKED WITH RECTANGLE. HOW THE FORMULA N!/K! CAME????????????

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский btme 2020-12-04 12:13:13 102
en2 Английский btme 2020-12-04 12:12:28 39
en1 Английский btme 2020-12-04 12:11:04 617 Initial revision (published)