提交时间:2023-10-05 11:28:04
运行 ID: 105197
#include<bits/stdc++.h> #define int long long using namespace std; int f(int x){ if(x==4){ cout<<"4,5-->9,10\n8,9-->4,5\n2,3-->8,9\n7,8-->2,3\n1,2-->7,8"<<endl; } else{ cout<<x<<","<<x+1<<"-->"<<2*x+1<<","<<2*x+2<<endl; cout<<2*x-1<<","<<2*x<<"-->"<<x<<","<<x+1<<endl; return f(x-1); } } signed main(){ int n; cin>>n; f(n); return 0; }