#include <bits/stdc++.h>
using namespace std;
#define ll long long
void sub1(ll k){
cout<<k+3<<' '<<2*(k+1)<<endl;
for(int i=2; i<=k+2; i++){
cout<<1<<' '<<i<<endl;
cout<<i<<' '<<k+3<<endl;
}
}
void sub2(ll k){
k = abs(k);
cout<<k+5<<' '<<3*(k+1)+2<<endl;
for(int i=2; i<=k+2; i++){
cout<<1<<' '<<i<<endl;
cout<<i<<' '<<k+3<<endl;
cout<<i<<' '<<k+4<<endl;
}
cout<<k+3<<' '<<k+5<<endl;
cout<<k+4<<' '<<k+5<<endl;
}
int main() {
ios::sync_with_stdio(0); cin.tie(0);
int t =1;
// cin>>t;
while(t--){
ll k;
cin>>k;
if(1 <= k && k < 500){
sub1(k);
}
else if(-300 < k && k <= -1){
sub2(k);
}
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
348 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 |
2 ms |
344 KB |
Correct. |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Correct. |
2 |
Correct |
1 ms |
344 KB |
Correct. |
3 |
Correct |
2 ms |
344 KB |
Correct. |
4 |
Correct |
1 ms |
344 KB |
Correct. |
5 |
Correct |
2 ms |
348 KB |
Correct. |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
348 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 |
2 ms |
344 KB |
Correct. |
6 |
Correct |
1 ms |
348 KB |
Correct. |
7 |
Correct |
1 ms |
344 KB |
Correct. |
8 |
Correct |
2 ms |
344 KB |
Correct. |
9 |
Correct |
1 ms |
344 KB |
Correct. |
10 |
Correct |
2 ms |
348 KB |
Correct. |
11 |
Incorrect |
1 ms |
348 KB |
Unexpected end of file - int32 expected |
12 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
348 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 |
2 ms |
344 KB |
Correct. |
6 |
Correct |
1 ms |
348 KB |
Correct. |
7 |
Correct |
1 ms |
344 KB |
Correct. |
8 |
Correct |
2 ms |
344 KB |
Correct. |
9 |
Correct |
1 ms |
344 KB |
Correct. |
10 |
Correct |
2 ms |
348 KB |
Correct. |
11 |
Incorrect |
1 ms |
348 KB |
Unexpected end of file - int32 expected |
12 |
Halted |
0 ms |
0 KB |
- |