[HELP] Edu round 86 Problem E

Revision en1, by adityagamer, 2024-01-20 19:39:47

Whats wrong with my solution for problem E : https://codeforces.net/contest/1342/problem/E?

Let c = n-k. Number of ways such that c columns are filled = (Number of ways such that <= c columns are filled) — (Number of ways such that <= c-1 columns are filled)

So formula is $$$ \binom{n}{c}c^n - \binom{n}{c-1}(c-1)^n $$$

Tags help

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English adityagamer 2024-01-20 19:39:47 362 Initial revision (published)