#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
#define int int64_t
#define ordered_set \
tree<int, null_type, less<int>, rb_tree_tag, \
tree_order_statistics_node_update>
#define F first
#define S second
#define I insert
#define PB push_back
#define POB pop_back
#define sqr(a) ((a) * (a))
#define P pop
#define max3(a, b, c) (max(a, max(b, c)))
#define max4(a, b, c, d) (max(max(a, b), max(c, d)))
#define min3(a, b, c) (min(a, min(b, c)))
#define min4(a, b, c, d) (min(min(a, b), min(c, d)))
#define MOD 1000000007
#define mod 998244353
int binpow(int a, int p, int m = MOD) {
int ans = 1;
while (p) {
if (p & 1) ans = ((ans % m) * (a % m)) % m;
a = sqr(a) % m;
p >>= 1;
}
return ans;
}
void solve() {
int k;
cin >> k;
if (k > 0) {
cout << k + 2 << ' ' << 2 * k << endl;
for (int i = 2; i <= k + 1; i++) {
cout << 1 << ' ' << i << endl << i << ' ' << k + 2 << endl;
}
} else if (k == 0) {
cout << 6 << ' ' << 6 << endl;
cout << "1 4\n"
<< "1 5\n"
<< "4 3\n"
<< "5 3\n"
<< "3 2\n"
<< "2 6" << endl;
} else {
k = abs(k);
cout << 2 * k + 2 << ' ' << 4 * k << endl;
for (int i = 2; i <= k + 1; i++) {
cout << 1 << ' ' << i << endl
<< i << ' ' << i + k << endl
<< i + k << ' ' << 2 * k + 2 << endl;
}
}
}
int32_t main() {
int t = 1;
// cin >> t;
while (t--) {
solve();
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
Wrong answer. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Unexpected end of file - int32 expected |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
Wrong answer. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
Wrong answer. |
2 |
Halted |
0 ms |
0 KB |
- |