← All problemsSign in

The February Problem

Given N, a permutation of N is said to be an array of numbers [1,2,3...N], such that each of the N numbers between 1 and N occur exactly once. For example, [2,3,5,4,1] and [4,5,2,3,1] are two of the many permutations for N = 5 . Count how many permutations of [1, 2, 3, ..., N] satisfy the following property. Let A1, A2, ..., AN denote the permutation. The property we want to check for , i

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start