Mathematics (JEE)Very hardCodeforces Div2 D

How many permutations p of {1, 2, ..., 6} satisfy p(i) != i and p(i) != 7 - i for every i from 1 to 6?

  1. A. 265
  2. B. 455
  3. C. 80
  4. D. 160

Correct answer: C. 80

Enumerating the 720 permutations and rejecting any with p(i) = i or p(i) = 7 - i for some i leaves 80.

More Permutations, Combinations and Probability questions

Exams that ask this topic