| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 | 2048 MB | 19 | 7 | 7 | 43.750% |
Chairman K has prepared a game for the participants of the spring training camp.
There are $N$ participants in the training camp, each assigned a unique number from 1ドル$ to $N$. Each participant has a board. The game follows these steps:
T’ on the parent’s board and the letter ‘F’ on all the children’s boards.T’ or ‘F’. Then, they submit their board to Chairman K.The goal of the game is to establish a strategy beforehand so that, regardless of who is chosen as the parent, all participants can correctly identify the parent by the end of the process.
A smaller value of $L$ results in a higher score. Your goal is to devise a strategy that minimizes $L$ while ensuring that all participants correctly identify the parent by the end of the process.
A strategy consists of a non-negative integer $L,ドル representing the number of turns, and a set of rules that determine the actions of each participant. The rules are as follows:
Devise a strategy that allows all participants to correctly identify the parent, regardless of who is chosen as the parent. Then, for each possible parent selection $(1, 2, \dots , N),ドル output the values that each participant writes on their board and the participant they choose to observe in each turn, following the established strategy.
Read the following data from the standard input.
$N$
Print the output in the following format:
$L$
$acts_1$
$acts_2$
$\vdots$
$acts_N$
Here, $acts_s$ represents the sequence of actions taken by each participant when participant $s$ is the parent. The format of $acts_s$ is as follows:
First, print the integer $s$. For each participant $i$ (1ドル ≤ i ≤ N$), print a single line containing the sequence of actions they take during the $L$ turns. Each line should have the following values:
T’ or ‘F’), which the participant writes on their board in turn $t$.These values should be printed for each turn $t$ (1ドル ≤ t ≤ L$) in sequence. Thus, the output format for $acts_s$ is:
$s$
$c_{1,1}$ $p_{1,1}$ $c_{1,2}$ $p_{1,2}$ $\cdots$ $c_{1,L}$ $p_{1,L}$
$c_{2,1}$ $p_{2,1}$ $c_{2,2}$ $p_{2,2}$ $\cdots$ $c_{2,L}$ $p_{2,L}$
$\vdots$
$c_{N,1}$ $p_{N,1}$ $c_{N,2}$ $p_{N,2}$ $\cdots$ $c_{N,L}$ $p_{N,L}$
The output is considered correct if and only if it can be obtained as the result of participants following a valid strategy that ensures all of them can correctly identify the parent. Specifically, the following two conditions must be met:
| Subtask | Input File | $N$ | Score | Maximum Score |
|---|---|---|---|---|
| 1 | 01.txt | 4ドル$ |
4ドル < L$ then 0ドル$ points 2ドル < L ≦ 4$ then 16ドル - 7 \times (L - 2)$ points $L ≦ 2$ then 16ドル$ points |
16ドル$ |
| 2 | 02.txt | 32ドル$ |
27ドル < L$ then 0ドル$ points 8ドル < L ≦ 27$ then 60ドル - 3 \times (L - 8)$ points $L ≦ 8$ then 60ドル$ points |
60ドル$ |
| 3 | 03.txt | 48ドル$ |
9ドル < L$ then 0ドル$ points $L ≦ 9$ then 24ドル$ points |
24ドル$ |
Note that if your score is 0, the grading system displays “Output isn’t correct”.
3
3 1 T 1 T 2 T 3 F 1 F 2 F 3 F 1 F 2 F 3 2 F 1 F 2 F 3 T 1 T 2 T 3 F 1 F 2 F 3 3 F 1 F 2 F 3 F 1 F 2 F 3 T 1 T 2 T 3
This output example can be obtained as the result of participants following the strategy below:
T’ if they are the parent, ‘F’ if they are a child. Note that they know whether they are a parent or a child according to the character they see in the initial step.T’ and submits their number as the parent.This ensures that everyone correctly identifies the parent, achieving the game’s objective. Since the strategy successfully meets the game’s objective for any chosen parent, the output is considered correct.
Note that the given example does not correspond to an actual test case, as it does not satisfy the given constraints.
Camp > JOI Spring Training Camp > JOI 2024/2025 Spring Training Camp 3-3번