I can't understand, how those weight adjustments are supposed to work. While description says "adjusting it by 5%", test results do not match with what i was expecting. For example: test with totalWeight: 77.5, barWeight: 15.5 and availablePlates: [38.25,38,32.25,14.25,8.5,4.75] expects [null] even thought using 1 plate of 32.25 on each side gives you total weight of 80, which is ~3% adjustment. Another example is totalWeight: 86.5, barWeight: 17.75, and availablePlates: [36.75,35,32.75,24,17.75,15,13,12.5,5.5], that expects [32.75] (total weight of 83.25, ~3.7% adjustment) instead of [35] (87.75 total, ~1.4% adjustment).
I matched the distances between the stars because I thought that for all I know, the satellite might not be in the same position it was before, and therefore maybe it wasn't just a simple rotation.
This comment is hidden because it contains spoiler information about the solution
Author/reference solution fails against a lot of test cases, such as
This comment is hidden because it contains spoiler information about the solution
Random test sometimes times out by itself.
Sanity check:
[null]
is not an appropriate return type;null
is.I can't understand, how those weight adjustments are supposed to work. While description says "adjusting it by 5%", test results do not match with what i was expecting. For example: test with
totalWeight: 77.5
,barWeight: 15.5
andavailablePlates: [38.25,38,32.25,14.25,8.5,4.75]
expects[null]
even thought using 1 plate of 32.25 on each side gives you total weight of 80, which is ~3% adjustment. Another example istotalWeight: 86.5
,barWeight: 17.75
, andavailablePlates: [36.75,35,32.75,24,17.75,15,13,12.5,5.5]
, that expects[32.75]
(total weight of 83.25, ~3.7% adjustment) instead of[35]
(87.75 total, ~1.4% adjustment)..
I matched the distances between the stars because I thought that for all I know, the satellite might not be in the same position it was before, and therefore maybe it wasn't just a simple rotation.
Thanks for this info. I finally figured out what to do after reading.
This comment is hidden because it contains spoiler information about the solution