|
|
Show all threads Hide all threads Show all messages Hide all messages | Why I get WA at test 10 | Walker | 1977. Energy Wall | 24 May 2021 17:14 | 1 | I use Segment tree.I can't find anything wrong in my code.Why? | test 7 - Wrong Answer | Zeratul | 1977. Energy Wall | 3 Apr 2015 23:45 | 2 | Can't catch where is error. Is there an error in my algorythm? х - energy quantum, amount of which is calculated by division (power_supply/sqr(d)), where 'power_supply' is amount of energy stored by previous save action and 'd' is an area in which wall segments are enforced. Energy portion for each segment is calculated by formula (d-delta)*x, where delta is a distance from the targeted segment. After energy distribution I just set power_supply to 0. Also energy saving and wall enforcing occurs after energy is generated for time passed from previous action. Edited by author 11.09.2013 19:50 If you get WA/RE on 7th test it makes sense to read statement carefully : n can be up to 10^9. |
|
|
|