#P17435. 「LWLV Round 1」W
「LWLV Round 1」W
Background
Little L really likes the letter W.
Problem Description
Little L wants you to construct a positive integer sequence that satisfies:
- This sequence has numbers, with indices in .
- .
Please find the maximum value of:
Input Format
One line with positive integers .
Output Format
One line containing this maximum value.
3 5 3
5
3 11 3
5
Hint
Sample Explanation
For sample 1, you can construct the sequence , and the answer is .
Constraints
| Subtask ID | Score | ||
|---|---|---|---|
| ^ | |||
For of the testdata, it is guaranteed that and .
Translated by ChatGPT 5