fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. typedef long long ll;
  4.  
  5. int main(){
  6. int l = 5;
  7. int n = (1 << l);
  8. cout << l << "\n";
  9. for(int i = 1; i < n-1; i += 2){
  10. cout << i << " " << i + 1 << "\n";
  11. }
  12. cout << n - 1 << " " << 0 << "\n";
  13. return 0;
  14. }
Success #stdin #stdout 0.01s 5276KB
stdin
Standard input is empty
stdout
5
1 2
3 4
5 6
7 8
9 10
11 12
13 14
15 16
17 18
19 20
21 22
23 24
25 26
27 28
29 30
31 0