A permutation of integers 1,2,…,n is called beautiful if there are no adjacent elements whose difference is 111. Given nnn, construct a beautiful permutation if such a permutation exists. Input The only input line contains an integer on n. Output Pri...
ramandeepsingh.hashnode.dev2 min read
No responses yet.