#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define ll long long
#define pii pair<int, int>
#define pll pair<ll, ll>
const int INF = 2147483645;
const ll NINF = 1e10;
const int maxN = (int)1e5+5;
const ll LLINF = LLONG_MAX;
//const ll mod = 998244353;
const ll mod = 1000000007;
void solv() {
ll k;
cin>>k;
if (abs(k) > 1000) {
cout<<1<<" "<<0<<'\n';
return;
}
if (k < 0) {
k *= -1;
cout<<k+5<<" "<<((k+1)*3)+2<<'\n';
cout<<1<<" "<<2<<"\n"<<1<<" "<<3<<'\n';
for (int i=4;i<=k+4;i++) {
cout<<2<<" "<<i<<'\n';
cout<<3<<" "<<i<<"\n";
cout<<i<<" "<<k+5<<'\n';
}
return;
}
cout<<k+3<<" "<<(k+1)*2<<'\n';
for (int i=2;i<=k+2;i++) cout<<1<<" "<<i<<'\n'<<i<<" "<<k+3<<'\n';
}
int main() {
ios::sync_with_stdio(0); cin.tie(0);
int t=1;
// cin>>t;
while (t--) solv();
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Correct. |
2 |
Correct |
1 ms |
348 KB |
Correct. |
3 |
Correct |
1 ms |
344 KB |
Correct. |
4 |
Correct |
1 ms |
348 KB |
Correct. |
5 |
Correct |
1 ms |
344 KB |
Correct. |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Correct. |
2 |
Correct |
1 ms |
348 KB |
Correct. |
3 |
Correct |
1 ms |
348 KB |
Correct. |
4 |
Correct |
1 ms |
348 KB |
Correct. |
5 |
Correct |
1 ms |
348 KB |
Correct. |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Correct. |
2 |
Correct |
1 ms |
348 KB |
Correct. |
3 |
Correct |
1 ms |
344 KB |
Correct. |
4 |
Correct |
1 ms |
348 KB |
Correct. |
5 |
Correct |
1 ms |
344 KB |
Correct. |
6 |
Correct |
1 ms |
344 KB |
Correct. |
7 |
Correct |
1 ms |
348 KB |
Correct. |
8 |
Correct |
1 ms |
348 KB |
Correct. |
9 |
Correct |
1 ms |
348 KB |
Correct. |
10 |
Correct |
1 ms |
348 KB |
Correct. |
11 |
Incorrect |
1 ms |
348 KB |
Wrong answer. |
12 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Correct. |
2 |
Correct |
1 ms |
348 KB |
Correct. |
3 |
Correct |
1 ms |
344 KB |
Correct. |
4 |
Correct |
1 ms |
348 KB |
Correct. |
5 |
Correct |
1 ms |
344 KB |
Correct. |
6 |
Correct |
1 ms |
344 KB |
Correct. |
7 |
Correct |
1 ms |
348 KB |
Correct. |
8 |
Correct |
1 ms |
348 KB |
Correct. |
9 |
Correct |
1 ms |
348 KB |
Correct. |
10 |
Correct |
1 ms |
348 KB |
Correct. |
11 |
Incorrect |
1 ms |
348 KB |
Wrong answer. |
12 |
Halted |
0 ms |
0 KB |
- |