#P5621. [DBOI2019] 德丽莎世界第一可爱
[DBOI2019] 德丽莎世界第一可爱
Description
There are Honkai beasts. Each Honkai beast has five attributes: health, energy, attack, defense, and collapse energy. For the -th Honkai beast, denote these five attributes by their initials as , , , , and .
Theresa may choose any Honkai beast to attack first. If she kills Honkai beast , she gains cuteness points. Since Theresa gets stronger as she fights, the next Honkai beast she fights must satisfy , , , and .
Please help Theresa compute the maximum total cuteness points she can obtain.
Input Format
The first line contains a positive integer .
The next lines: on line , there are five integers , representing the attribute values of the -th Honkai beast.
Output Format
Output one integer, representing the maximum cuteness points (she must kill at least one Honkai beast). The answer is guaranteed not to exceed the range of long long ().
5
1 9 3 6 233
0 8 3 7 666
-3 9 4 2 810
2 3 3 3 -100
1 8 8 9 603
1269
Hint
| Subtask ID | Score | |
|---|---|---|
For of the testdata, it holds that , and .
Translated by ChatGPT 5
京公网安备 11011102002149号