Why you initialized query with infinity?
Competitive Programming
cpp-★-dynamic-programming--reduce-a-number-to-one-in-minimum-number-of-step-1-d-dp
babu_bhai
(Ashish Agarwal)
July 2, 2019, 7:42pm
#1
qaaaaaaaaaaaaaaaa aaaaaaaaaaaaa aaaaaaaaaaaaa