#P8913. [RC-06] Remake
[RC-06] Remake
Problem Description
Please construct positive integers that satisfy:
- For every even , there exist such that for all , and . The values of and are given in the Constraints.
- Let be the number of indices such that . Then must be either or at least .
- .
To verify that your indeed satisfy the conditions, queries will be given. In each query, an even is given. You need to output one valid set of .
Input Format
The first line contains two positive integers , where is the upper bound of . In the testdata, it is guaranteed that .
In the next lines, each line contains one positive even integer . It is guaranteed that .
Note that and are not given in the input. You may assume that and .
Output Format
The first line outputs the number of positive integers you construct, . .
The next line outputs positive integers . .
In the next lines, each line contains characters, each being + or -. Let the -th character be , and let the value in this query be . Then it must satisfy + - , where equals if is true, and otherwise.
The you output must satisfy the requirements in the statement.
Input Format
The first line contains two positive integers , where is the upper bound of . In the testdata, it is guaranteed that .
In the next lines, each line contains one positive even integer . It is guaranteed that .
Note that and are not given in the input. You may assume that and .
Output Format
The first line outputs the number of positive integers you construct, . .
The next line outputs positive integers . .
In the next lines, each line contains characters, each being + or -. Let the -th character be , and let the value in this query be . Then it must satisfy + - , where equals if is true, and otherwise.
The you output must satisfy the requirements in the statement.
6 3
2
4
6
8
1 1 1 1 1 1 1 1
++-+-++-
++-++++-
++-+++++
Hint
This problem has three subtasks.
All testdata satisfy: , , .
- Subtask ( points): , .
- Subtask ( points): , .
- Subtask ( points): , .
Translated by ChatGPT 5