#P13341. [EGOI 2025] Monster-Go

    ID: 15207 远端评测题 1000ms 1024MiB 尝试: 0 已通过: 0 难度: 6 上传者: 标签>2025Special JudgeEGOI(欧洲/女生)

[EGOI 2025] Monster-Go

题目描述

Helen and her friends have discovered an amazing new game for their phones. The game, called Monster-Go, is about catching monsters by walking to different monster nests outdoors. There are an infinite number of monsters of a single type available at each nest. When the friends arrive at a monster nest, each of them will catch and add the monster type at that nest to their collection. There are a total of 5050 different monster types that the friends can catch, numbered 0,1,,490, 1, \ldots, 49.

To make the game more exciting, the NN friends have decided that each player will have a personalized list of exactly 1212 monster types to collect. The first person to catch all the monsters on their list wins the game. They want to design the lists in such a way that, no matter the order in which they visit the monster nests, there is always a single, unique winner – never a tie. The friends always walk around together as a group and arrive together at a monster nest.

Can you help them design the lists? Your score will depend on the number of values of NN, the number of people playing, for which you are able to solve the problem.

输入格式

The first and only line of input contains the integer NN, the number of players.

输出格式

Output NN lines, where the iith line has 1212 distinct integers ci,1,ci,2,,ci,12c_{i,1}, c_{i,2}, \ldots, c_{i,12} (where 0ci,j490 \leq c_{i,j} \leq 49) representing the monster types on the list of person ii. If there are multiple solutions, you may print any of them.

2
0 1 2 3 4 5 6 7 8 9 10 11
38 39 40 41 42 43 44 45 46 47 48 49

提示

Example

In the sample, where there are N=2N = 2 friends, the program should output two lists. Indeed, for the two lists in the sample output, the friends cannot both win at the same time, no matter the order in which they visit the monster nests. Note that there are many other valid answers.

Constraints and Scoring

  • 1N501 \leq N \leq 50.

Your solution will be tested on a set of test groups, each worth a number of points. The iith test group contains a single test case with N=iN = i and is worth 2 points. That is, there are a total of 50 tests (one for each N=1,2,,50N = 1, 2, \ldots, 50), and your score on this problem is twice the number of tests your program solves.

Group Score Limits
1 2 N=1N = 1
2 N=2N = 2
3 N=3N = 3
\vdots
49 2 N=49N = 49
50 N=50N = 50