You are viewing a single comment's thread. Return to all comments →
Here is the C++ solution :
Circular Tour replace this few statements :
n=petrolpumps.size(); pet+=petrolpumps[i][0]; if(pet-petrolpumps[i][1]>=0) { pet-=petrolpumps[i][1]; j++; }
Seems like cookies are disabled on this browser, please enable them to open this website
Truck Tour
You are viewing a single comment's thread. Return to all comments →
Here is the C++ solution :
Circular Tour replace this few statements :
n=petrolpumps.size(); pet+=petrolpumps[i][0]; if(pet-petrolpumps[i][1]>=0) { pet-=petrolpumps[i][1]; j++; }