Description
Ascian Elidibus summons hero fragments from distant worlds through spells, and gathers the pure desire to save the world in his own soul, forming a collection of the concept of the hero "Warrior of Light".
Because he once served as the heart of Zodiac, Elidibus is not complete now. Even if the memory has faded, even if he can no longer remember the person he promised, he will defeat us.
Elidibus the Warrior of Light has three different abilities:
Sword of Light: Deal
Solemn Confiteor: Deal
Ascendance: Binds enemies so they cannot move.
Our health point is
Elidibus first bind us with Ascendance. Then Elidibus will attack
The attack range of the Sword of Light will be given in the form of the coordinates of the three vertices of the triangle.
The attack range of Solemn Confiteor will be given in the form of the coordinates of the center of the circle and the radius of the circle.
We take damage both at the borders and inside the attack range.
Will we still be alive after Elidibus' attack is over? If we are still alive, output the remaining health point, otherwise output how much excess damage Elidibus did.
Input
The first line has two integers
The second line has two integers
Next n lines, each with an integer
If
If
Output
An integer on a line, representing the player's remaining health point or the excess damage dealt by Elidibus.
Sample Input
2 2 2 2 1 0 0 0 4 4 0 2 0 0 2
Sample Output
1
Note
Elidibus gathered the pure desire to save the world in his own soul, forming the totality of the hero "Warrior of Light". Its appearance should be very similar to the hero who saved a certain world in a certain era. Or maybe he thinks a hero should be like this.
难度等级: | 0 |
总通过次数: | 25 |
总提交次数: | 517 |