Home > other >  Greedy problem - water spray device
Greedy problem - water spray device

Time:12-03

Title, as shown on the left side of the code is written by myself, error rate by 83%, then the code on the right is my reference other bosses code changes, after two code only green box is not the same,,,, I really want to know where is wrong, my own code, test several times didn't find his mistakes,,

CodePudding user response:

I am of the view that... While (kThe simplest find a counter example, suppose that this is a slender like noodles of the lawn, 1 m wide 1 cm long, the coverage radius of the fountain of 10 centimeters, a total of 50 nozzle,
Assume that the input when using rice as a unit, the L (here in capital letters in order to avoid confused and digital) becomes 1,
As a result k CodePudding user response:

reference 1st floor yyfhz response:
my opinion, the... While (kThe simplest find a counter example, suppose that this is a slender like noodles of the lawn, 1 m wide 1 cm long, the coverage radius of the fountain of 10 centimeters, a total of 50 nozzle,
Assume that the input when using rice as a unit, the L (here in capital letters in order to avoid confused and digital) becomes 1,
As a result k

Thank you thank you , I tried it on, problem do as you say

CodePudding user response:

reference 1st floor yyfhz response:
my opinion, the... While (kThe simplest find a counter example, suppose that this is a slender like noodles of the lawn, 1 m wide 1 cm long, the coverage radius of the fountain of 10 centimeters, a total of 50 nozzle,
Assume that the input when using rice as a unit, the L (here in capital letters in order to avoid confused and digital) becomes 1,
As a result k

Thank you thank you , I tried it on, problem do as you say
  • Related