B. 【例65.1】 循环比赛

    Type: RemoteJudge 1000ms 256MiB

【例65.1】 循环比赛

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

说明

设有NN个选手进行循环比赛,其中N=2MN=2^M,要求每名选手要与其他N1N−1名选手都赛一次,每名选手每天比赛一次,循环赛共进行N1N−1天,要求每天没有选手轮空。

输入格式

输入:MM

输出格式

输出:表格形式的比赛安排表。一行各数据间用一个空格隔开。

样例

3
1 2 3 4 5 6 7 8
2 1 4 3 6 5 8 7
3 4 1 2 7 8 5 6
4 3 2 1 8 7 6 5
5 6 7 8 1 2 3 4
6 5 8 7 2 1 4 3
7 8 5 6 3 4 1 2
8 7 6 5 4 3 2 1

2025-10-25-课堂循环结构

Not Attended
Status
Done
Rule
XCPC
Problem
4
Start at
2025-10-25 11:15
End at
2025-10-25 13:15
Duration
2 hour(s)
Host
Partic.
43