int can(int[] gas, int[] cost) {
begin = 0
sum = 0
tank = 0
for( i = 0 to i < gas.size() ) {
tank = tank + gas[i] - cost[i]
if(tank < 0) {
begin = i+1
sum= sum + tank
tank=0
}
}
if(sum + tank < 0) {
return -1
} else {
return start
}
}