hi i was just going thru the editorial of the contest, and was wondering the functionality of this LOOP:
for(int i = 29;i >= 1;i--) { if((n >> i) & 1) { f = 1; v.push_back(2); } else if(f) { v.push_back(1); } }
in ques 2 of the contest..
can anyone help me with this..?