Hi guys,
Im programing a new exerciese that i need to do for a college project, in C++.
You need to pick the minimal ways so that the car's fuel tank is as low as possible.
This is what I think should be done, but it isn’t working.
Do you have any ideas on how I can make it work?
int nodo = origen;
int minimo = INT_MAX;
while(nodo != destino){
for (int j = 0; j < totalNodos; j++){
if(!visitado[j] && coste[nodo][j] < minimo){
nodoMinimo = j;
minimo = coste[nodo][j];
}
}
nodo = v
if(minimoTotal < minimo ) minimoTotal = minimo;
}
Hi guys,
Im programing a new exerciese that i need to do for a college project, in C++.
That project consists in implementing an algorithm that just goes the
minimal ways, not like Dijkstra’s algorithm but something similar: You
are have a car, that needs to go from France to Corea and you need to
refil your gas tank . You need to pick the minimal ways so that the
car's fuel tank is as low as possible.
Darioes <dario...@gmail.com> writes:
Hi guys,
Im programing a new exerciese that i need to do for a college project, in C++.
That project consists in implementing an algorithm that just goes the minimal ways, not like Dijkstra’s algorithm but something similar: You are have a car, that needs to go from France to Corea and you need to refil your gas tank . You need to pick the minimal ways so that the
car's fuel tank is as low as possible.
That last phrase is a little confusing.
Hi guys,
Im programing a new exerciese that i need to do for a college project, in C++.
That project consists in implementing an algorithm that just goes the minimal ways, not like Dijkstra’s algorithm but something similar: You are have a car, that needs to go from France to Corea and you need to refil your gas tank . You need to pickthe minimal ways so that the car's fuel tank is as low as possible.
That project consists in implementing an algorithm that just goes the minimal ways, not like Dijkstra’s algorithm but something
similar: You are have a car, that needs to go from France to Corea and you need to refil your gas tank . You need to pick the minimal
ways so that the car's fuel tank is as low as possible.
Im programing a new exerciese that i need to do for a college
project, in C++.
That project consists in implementing an algorithm that just goes
the minimal ways, not like Dijkstra's algorithm but something
similar: You are have a car, that needs to go from France to Corea
and you need to refil your gas tank . You need to pick the minimal
ways so that the car's fuel tank is as low as possible.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 293 |
Nodes: | 16 (2 / 14) |
Uptime: | 210:53:57 |
Calls: | 6,619 |
Calls today: | 1 |
Files: | 12,168 |
Messages: | 5,317,250 |