Home > Back-end >  code
code

Time:11-20

Tu pears senior project selected topic is to develop the game "pear big adventure", A copy of the game known in the evil BOSS map coordinates (X, Y), the protagonist pears use vehicles emit N shells, fell on the N coordinates respectively, each shell can attack circular area within the scope of its radius R (R) including boundary, damage to A (making was less A) to attack the enemy blood values, known BOSS initial blood value is 100, after this wave of artillery attacks, how much is left BOSS blood (when the enemy killed, blood values to 0)?
Input

The first line of input two real Numbers (X, Y), space interval, said BOSS map coordinates,
The second line of the input two integers R and A, respectively radius of artillery attack and damage
The third line, enter an integer N, said shells number
Followed by N lines, each line of two real Numbers (x, y), space interval, said the coordinates of the artillery strikes

The Output

Output as an integer, BOSS said the remaining blood values

The Sample Input


0 2
2 5
2
0 3
0-1


The Sample Output


95

CodePudding user response:

Who is a great god help take a look at the code the wrong which

# include
# include
Int main ()
{
Int c, d, e, k=100;
Double a, b, f, g, h, I;
Lf scanf_s (" % & amp; Lf \ n ", & amp; A, & amp; B);
Scanf_s (" % d % d \ n ", & amp; C., & amp; D);
Scanf_s (" % d \ n ", & amp; E);
For (; E & gt; 0;)
{
Lf lf scanf_s (" % % \ n ", & amp; F, & amp; G);
E -; H=fabs (a - f); I=fabs (b - g);
If (h & lt;=c & amp; & i <=c)
{
K=k - d;
}

}
Printf (" % d ", k);
return 0;
}

CodePudding user response:

If (h & lt;=c & amp; & i <=c)
{
K=k - d;
}
Instead of
If (h + h * I * I & lt; C=c *)
{
K -=d;
}