fork download
  1. #include <cstdio>
  2. #include <cmath>
  3. #include <iostream>
  4. #include <set>
  5. #include <algorithm>
  6. #include <vector>
  7. #include <map>
  8. #include <cassert>
  9. #include <string>
  10. #include <cstring>
  11. #include <queue>
  12.  
  13. using namespace std;
  14.  
  15. #define rep(i,a,b) for(int i = a; i < b; i++)
  16. #define S(x) scanf("%d",&x)
  17. #define S2(x,y) scanf("%d%d",&x,&y)
  18. #define P(x) printf("%d\n",x)
  19. #define all(v) v.begin(),v.end()
  20. #define FF first
  21. #define SS second
  22. #define pb push_back
  23. #define mp make_pair
  24.  
  25. typedef long long int LL;
  26. typedef pair<int, int > pii;
  27. typedef vector<int > vi;
  28.  
  29. int main() {
  30. P(1);
  31. int n = 63;
  32. P(n);
  33. rep(i,0,n) {
  34. if(i < 2) printf("1 ");
  35. else if(i < 21) printf("0 ");
  36. else printf("2 ");
  37. }
  38. printf("\n");
  39. rep(i,1,n) {
  40. int x = 2 * i;
  41. if(x <= n) printf("%d %d\n",i,x);
  42. x = 2 * i + 1;
  43. if(x <= n) printf("%d %d\n",i,x);
  44. }
  45. return 0;
  46. }
  47.  
Success #stdin #stdout 0s 15232KB
stdin
Standard input is empty
stdout
1
63
1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 
1 2
1 3
2 4
2 5
3 6
3 7
4 8
4 9
5 10
5 11
6 12
6 13
7 14
7 15
8 16
8 17
9 18
9 19
10 20
10 21
11 22
11 23
12 24
12 25
13 26
13 27
14 28
14 29
15 30
15 31
16 32
16 33
17 34
17 35
18 36
18 37
19 38
19 39
20 40
20 41
21 42
21 43
22 44
22 45
23 46
23 47
24 48
24 49
25 50
25 51
26 52
26 53
27 54
27 55
28 56
28 57
29 58
29 59
30 60
30 61
31 62
31 63