Combinatorics problem

Revision en1, by Kanata18, 2025-01-20 04:44:20

Hello codeforces community!!

On this occasion I bring up a combinatorics problem.

This is the problem:

How many permutations of length N exist such that the following holds: for each i (1 <= i < N) p[i+1] — p[i] != 1

Constants: 1 <= N <= 500

Tags combinatorics

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English Kanata18 2025-01-20 04:48:27 0 Tiny change: 'N) p[i+1] &mdash; p[i] != 1' -> 'N) p[i+1] - p[i] != 1'
en2 English Kanata18 2025-01-20 04:46:53 0 Initial revision
en1 English Kanata18 2025-01-20 04:44:20 280 Initial revision (published)