#include <iostream>
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
int q = pow(2, n);
int a[100] = {0};
int check[100][100];
int k;
int ans = 0;
int sum = q / 2;
for (int i = 1; i <= q - 1; i++) {
printf("<%d>", i);
memset (a, 0, sizeof(a));
for (int j = 1; j <= q; j++) {
if (a[j] == 0) {
a[j] = 1;
int k = j + 1;
while (6) {
if (a[k] == 0 && check[j][k] == 0) {
check[j][k] = 1;
a[k] = 1;
cout << j << "-" << k;
ans++;
if (ans != sum)
cout << ",";
if (ans == sum)
ans = 0;
break;
}
k++;
}
}
}
cout << endl;
}
return 0;
}
//<1>1-2,3-4
//<2>1-3,2-4
//<3>1-4,2-3
比赛安排3.28
最新推荐文章于 2024-09-08 20:09:39 发布