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
#include<bits/stdc++.h>
using namespace std;

int n,t[105][2],k;

int main()
{
    cin>>k;
    cout<<92<<'\n';
    for(int i = 1;i <= 100; i++)
        t[i][0] = t[i][1] = -1;
    for(int i = 1;i < 91; i += 3)
    {
        t[i][0] = i + 1;
        t[i][1] = i + 2;
        t[i + 1][0] = i + 3;
        t[i + 2][0] = i + 3;
    }
    int x = 0;
    while(k > 0)
    {
        if((k & 1))
            t[(x + 1) * 3][1] = 92;
        x++;
        k >>= 1;
    }
    for(int i = 1;i <= 92; i++)
        cout<<t[i][0]<<" "<<t[i][1]<<'\n';
    return 0;
}