Cod sursa(job #1509026)

Utilizator andrei1299Ghiorghe Andrei Alexandru andrei1299 Data 23 octombrie 2015 13:50:20
Problema Algoritmul lui Dijkstra Scor 0
Compilator cpp Status done
Runda Arhiva educationala Marime 0.68 kb
#include <iostream>

using namespace std;


struct Nod
{
    int nod, cost;
    bool operator < (const Nod& e) const
    {
        return cost > e.cost;
    }
};
int N,M,d[1002];
vector<Nod> h[250002];

inline void Citirea()
{
    int i,x,y,z;
    Nod w;
    ifstream fin("dijkstra.in");
    fin>>N>>M;
    for(i=1;i<=M;i++)
    {
        fin>>x>>y>>z;
        w.nod=y;
        w.cost=z;
        h[x].push_back(w);
    }
    fin.close();
}

inline void Dijkstra()
{
    priority_queue<Nod> q;
    Nod w,w1;
    int i;
    for(i=2;i<=N;i++)
        d[i]=1000000000;
    d[1]=0;
    w.nod=1;
    w.cost=0;


}



int main()
{

    return 0;
}