You are viewing a single comment's thread. Return to all comments →
if u consider the case of 1 4 1123834. You need to consider (-1,-1,-1) as well to get the ans.
case 1:(1,4,1123834)->(1,1,1)=(0,3,1123833) steps (0,2,224768), Total = 224770
case 2:(1,4,1123834)->(0,0,0)=(1,4,1123834) steps (1,2,224768) Total = 224771
case 2:(1,4,1123834)->(-1,-1,-1)=(2,5,1123835) steps (1,1,224767) Total = 224769
ans = min(224770,224771,224769) = 224769.
Seems like cookies are disabled on this browser, please enable them to open this website
Equal
You are viewing a single comment's thread. Return to all comments →
if u consider the case of 1 4 1123834. You need to consider (-1,-1,-1) as well to get the ans.
case 1:(1,4,1123834)->(1,1,1)=(0,3,1123833) steps (0,2,224768), Total = 224770
case 2:(1,4,1123834)->(0,0,0)=(1,4,1123834) steps (1,2,224768) Total = 224771
case 2:(1,4,1123834)->(-1,-1,-1)=(2,5,1123835) steps (1,1,224767) Total = 224769
ans = min(224770,224771,224769) = 224769.