Before passing comments, you could have at least made the efforts for reading the problem statement carefully. The problem statement said: " A permutation p1,p2…pN is beautiful if pi&pi+1 is greater than 0 for every 1≤i<N . You are given an integer N, and your task is to construct a beautiful permutation of length N or determine that it’s impossible".

So as per this, for N=1, the sequence {1} does not satisfy the condition for being a beautiful permutation.

While what you say would have been correct if the problem statement mentioned: “A permutation p1,p2…pN is **not beautiful** if pi&pi+1 **is equal to 0** for any 1≤i<N . You are given an integer N, and your task is to construct a beautiful permutation of length N or determine that it’s impossible”

I read the statement many times during the contest. Thought a lot on where I was going wrong and only then I posted here. Judging people and passing comments is very easy. Let me tell you that this platform is for enjoying the sport of competitive programming and problem solving not for pointing fingers at one another. Setters and testers can also make mistakes. After all they are humans.