Cod sursa(job #1824761)

Utilizator Theodor1000Cristea Theodor Stefan Theodor1000 Data 8 decembrie 2016 13:20:08
Problema Flux maxim de cost minim Scor 0
Compilator cpp Status done
Runda Arhiva educationala Marime 0.98 kb
#include <cstdio>
#include <algorithm>
#include <queue>
#include <vector>
#include <functional>

#define pii pair <int, int>
#define f first
#define s second

using namespace std;

vector <int> v[512];
int f[512][512], c[512][512], cost[512][512], dij[512][512], t[512];
int n, m, s, d;
queue <int> q;
priority_queue <pii, vector <pii>, greater <pii> > pq;

inline void bellman ()
{
    q.push (1);
    for (; !q.empty (); q.pop ())
    {
        int nod = q.front ();

    }
}

int main ()
{
    freopen ("fmcm.in", "r", stdin);
    freopen ("fmcm.out", "w", stdout);

    scanf ("%d %d %d %d", &n, &m, &s, &d);

    for (int i = 1; i <= m; ++i)
    {
        int x, y, cap, cst;
        scanf ("%d %d %d %d", &x, &y, &cap, &cst);

        v[x].push_back (y);
        v[y].push_back (x);

        c[x][y] = cap;
        cost[x][y] = cst;
        cost[y][x] = -cst;
    }

    bellman ();
    for (; dijkstra ();)
    {

    }

    return 0;
}