This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
#define int long long
const int MOD = 1e9+7;
int32_t main(){
int k;cin>>k;
if (k>=0){
cout<<k+3<<" "<<(k+1)*2<<endl;
for (int i = 2; i < k+3; i++){
cout<<1<<" "<<i<<endl;
cout<<i<<" "<<k+3<<endl;
}
return 0;
}
else {
k=-k;
cout<<k+5<<" "<<(k+1)*4<<endl;
for (int i = 4; i < k+5; i++){
cout<<1<<" "<<i<<endl;
cout<<2<<" "<<i<<endl;
cout<<3<<" "<<i<<endl;
cout<<i<<" "<<k+5<<endl;
}
cout<<1<<" "<<3<<endl;
cout<<1<<" "<<2<<endl;
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |