Cod sursa(job #2267958)

Utilizator UnseenMarksmanDavid Catalin UnseenMarksman Data 24 octombrie 2018 13:00:42
Problema A+B Scor 0
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 1.06 kb
#include <fstream>
#include <vector>
#include <algorithm>
#include <queue>
#define maxn 52
#define maxw 1002
#define Inf 2000000000
using namespace std;

ifstream fin("lanterna.in");
ofstream fout("lanterna.out");

int n, k, m, t[maxw], ok[maxn];
int dist[maxn][maxn], watt[maxn][maxn], inq[maxn][maxw], minim, res;

vector<int>G[maxn];
queue<pair<int,int>>q;

int main()
{
    int v1, v2, v3, v4;
    fin>>n>>k;
    for(int i=1; i<=n; i++)
        for(int j=1; j<=n; j++)
            dist[i][j]=Inf;
    for(int i=1; i<=n; i++) fin>>ok[i];
    fin>>m;
    for(int i=1; i<=m; i++)
    {
        fin>>v1>>v2>>v3>>v4;
        G[v1].push_back(v2);
        G[v2].push_back(v1);
        dist[v1][v2]=dist[v2][v1]=v3;
        watt[v1][v2]=watt[v2][v1]=v4;
    }

    for(int k1=1; k1<=k; k1++)
    {
        int mid=k1;
        q.push(make_pair(1,mid));
        while(q.size())
        {
            int nod=q.front().first;
            int wleft=q.front().second;

            for(auto it:G[nod])
            {

            }
        }
    }
    fout<<t[minim]<<' '<<minim;
    return 0;
}