#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int n;
cin >> n;
cout << 95 << endl;
for (int i=1; i<16; i++)
cout << 2*i << ' ' << 2*i+1 << endl;
for (int i=32; i<64; i++)
cout << ((n&(1<<(63-i)))?i:-1) << ((i%2==0)?' ':'\n');
for (int i=32; i<63; i++)
cout << i+1 << ' ' << ((i+1)+32) << endl;
cout << "-1 95\n";
for (int i=32; i<63; i++)
cout << i+1 << ' ' << ((i+1)+32) << endl;
cout << "-1 -1\n";
return 0;
}
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 | #include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); int n; cin >> n; cout << 95 << endl; for (int i=1; i<16; i++) cout << 2*i << ' ' << 2*i+1 << endl; for (int i=32; i<64; i++) cout << ((n&(1<<(63-i)))?i:-1) << ((i%2==0)?' ':'\n'); for (int i=32; i<63; i++) cout << i+1 << ' ' << ((i+1)+32) << endl; cout << "-1 95\n"; for (int i=32; i<63; i++) cout << i+1 << ' ' << ((i+1)+32) << endl; cout << "-1 -1\n"; return 0; } |
English