Or login with:
| boolderangement_check( | int | n | |
| int* | a | )[inline] |
#include <codecogs/maths/combinatorics/permutations/derangement_check.h> #include <iostream> int main() { int x[4] = {4, 3, 2, 1}, y[5] = {1, 3, 2, 5, 4}; std::cout << Maths::Combinatorics::Permutations::derangement_check(4, x) << std::endl; std::cout << Maths::Combinatorics::Permutations::derangement_check(4, y) << std::endl; return 0; }
1 0
| n | the size of the permutation |
| a | the actual permutation given as an array |
Source code is available when you agree to a GP Licence or buy a Commercial Licence.
Not a member, then Register with CodeCogs. Already a Member, then Login.
You must login to leave a messge