Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <math.h>
- using namespace std;
- int main(){
- int s[32], i, N;
- cin >> N;
- for(int i=0; i<N; i++)
- cin >> s[i];
- cout << log(N);
- int stop = (int)(log(N));
- //cout << stop;
- for(int i=0; i<pow(2, stop)-1; i++)
- cout << i*2+1 << ", ";
- }
Add Comment
Please, Sign In to add comment