Cod sursa(job #1807101)

Utilizator DobosDobos Paul Dobos Data 16 noiembrie 2016 00:30:41
Problema A+B Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.83 kb
#include <bits/stdc++.h>

#define TMAX 100005
#define NMAX 11

using namespace std;

int M[TMAX][NMAX][NMAX];

vector < pair < int , int > > G[NMAX][NMAX];
deque <  int > V;

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

void bfs(int n){
    int nod;
    while(!V.empty()){
        nod = V.front();



    }

}




int main()
{
    ios :: sync_with_stdio(false);
    fin.tie(NULL);

    int n,T,x,y,p;

    fin >> T;

    for(int i = 1; i <= T; i++){
        fin >> n;
        for(int j = 1; j < n; j++){
            fin >> x >> y >> p;
            G[i][y].push_back({x,p});
        }
        for(int j = 1; j <= n; j++){
            if(G[i][j].size() == 0){
                V.push_back(j);
                j = n + 1;

            }
        }

        bfs(i);


    }

    return 0;
}