#P6020. [Ynoi2010] Exponential tree
[Ynoi2010] Exponential tree
Problem Description
Given , you need to construct a matrix that only contains and , where , satisfying:
- .
- .
- For , .
- If and , then there exists such that .
- For , .
You need to output every such that and . Let there be such pairs .
If your output does not meet the requirements, you cannot get any score for that test point. If your output meets the requirements, then it will be scored based on .
Input Format
One line with two integers .
Output Format
The first line contains an integer . The next lines each contain two integers , representing each pair that satisfies and , in order.
3 2
1
0 2
Hint
For of the testdata, and .
| 2 | 7.987 |
| 3 | 3.8085 |
| 4 | 2.396 |
| 5 | 1.961 |
| 6 | 1.6065 |
| 7 | 1.451 |
| 8 | 1.2535 |
| 9 | 1.1975 |
| 10 | 1.099 |
| 11 | 1.07 |
| 12 | 1.034 |
| 13 | 1.0115 |
| 14 | 1.001 |
| 15 | 0.994 |
Each corresponds to a subtask with total score . The score of each subtask is the minimum score among all test points in that subtask.
For each test point, the score equals the subtask's total score multiplied by $\max\left(0,1-\sqrt{\max\left(0,\frac{m}{n\cdot f(k)}-1\right)}\right)$.
Translated by ChatGPT 5