I 've misunderstood the problem... Can you please tell me what the problem wants and how above solution produces the desired answer 19? Thanks in advance.

According the problem description, one sprinkler on position x with current flow c will irrigate positions between x-c and x+c. For example, if sprinkler is in position 5 and his flow is 3, that sprinkler will irrigate positions between 5-3=2 and 5+3=8, that means positions 2,3,4,5,6,7 and 8. It seems, that you don't assume, that sprinkler irrigate his own position. The fact is, that sprinkler will irrigate it's own position too.

One exception - as was discussed above, if current flow of sprinkler is zero, no position are irrigate.

In example, number of locations is 20. Sprinklers are on positions 2,6,10,11,13,17 and the flows of sprinklers are 1,2,1,0,1,2 respectively.

First sprinkler on position 2 will irrigate positions between 2-1 and 2+1, i.e. 1,2 and 3.
Second sprinkler on position 6 will irrigate positions between 6-2 and 6+2, i.e. 4.5.6.7 and 8.
Third sprinkler on position 10 will irrigate positions between 10-1 and 10+1, i.e. 9,10 and 11.
Fourth sprinkler on position 11 will irrigate nothing.
Fifth sprinkler on position 13 will irrigate positions between 13-1 and 13+1, i.e. 12,13 and 14.
Sixth sprinkler on position 17 will irrigate positions between 17-2 and 17+2, i.e. 15,16,17,18 and 19.

Total 19 locations are irrigate, 1-3 from sprinkler 1, 4-8 from sprinkler 2, 9-11 from sprinkler 3, 12-14 from sprinkler 5, 15-19 from sprinkler 6. Only position 20 is not irrigate.

I solved it with bruteforce too For my solution are important small values for number of sprinklers (10) and maximum total flow (10). Although I am 37th of 37 solvers, my time is not horrible (2.470 seconds, time limit for this problem is 5.000 seconds).