This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Algoritmo de Dijkstra, el Camino mas Corto | |
//Fork de Dijkstra por: nateshmbhat https://gist.github.com/nateshmbhat/1a79daa00a148e44ad79c3e338977440 | |
//Fork de nateshmbhat por: Alejandro Sacristan Leal https://gist.github.com/AtonCode/acd3077fa70a2cbb6fcbe211a206c4dd | |
// | |
#include <iostream> | |
#include <stdio.h> | |
#include <vector> | |
#include <algorithm> | |
#include <string> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<bits/stdc++.h> | |
using namespace std ; | |
int cost[100][100] , n ; | |
int getMin(int dist[] , bool visited[]){ | |
int key = 0 ; | |
int min = INT_MAX ; | |
for(int i=0;i < n ; i++){ | |
if(!visited[i] && dist[i]<min){ |