btme's blog

By btme, history, 6 weeks ago, In English

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????????????

 
 
 
 
  • Vote: I like it
  • -1
  • Vote: I do not like it

»
6 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by btme (previous revision, new revision, compare).

»
6 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by btme (previous revision, new revision, compare).