For test case 4, why is the output 2? (1 Viewer)

Interdice

Well-Known Member
Joined
Jun 24, 2021
Messages
522
Gender
Male
HSC
2023

My program counts a value much higher than 2.

Essentially if the distance is greater than Z, an variable must be increased.

Z = 4. An example is T. Because T is 4 away in the x and 2 away in the y. distance = sqrt(4^2 + 2^2). since distance > Z it is incremented.

However for the case F, distance = sqrt(5^2+1^2). Z = 4. distance > Z, but for some reason it's not counted. There are a few more cases like this. Pls help

And teh reason I am posting this is because on stackoverflow, you can't post questions like this, and there is no subreddit for competitive programming, and whenever I ask anybody, no one answers. And there are no solutions for this problem online.

https://codeforces.com/blog/entry/2120 not helpful
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top