#include <bits/stdc++.h>
#define endl "\n"
#define pb push_back
#define int long long
using namespace std;
const int inf = 2e18 + 5;
const int N = 5e3 + 5;
const int mod = 998244353;
int fpow(int a, int b){
if(b == 0) return 1;
int p = 1;
while(b){
if(b&1) p = p*a;
b = b/2;
a = a*a;
}
return p;
}
int32_t main(){
//freopen("in.txt","r", stdin);
int k;
cin>>k;
if(k == 1){
cout<<1<<" "<<0<<endl;
return 0;
}
int nnode = 1;
vector<pair<int, int> > adj;
vector<int> waitlist;
int ak = abs(k);
while(ak--){
if(k > 0){
nnode++;
adj.pb({1, nnode});
waitlist.pb(nnode);
}
}
cout<<nnode+1<<" "<<adj.size() + waitlist.size()<<endl;
for(auto itr: adj){
cout<<itr.first<<" "<<itr.second<<endl;
}
for(auto itr: waitlist){
cout<<itr<<" "<<nnode+1<<endl;
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
Wrong answer. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
600 KB |
Wrong answer. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
Wrong answer. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
Wrong answer. |
2 |
Halted |
0 ms |
0 KB |
- |