Advertisement
mhdew

xsfcxzs cvzsdb zv zs

Jul 25th, 2019
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.71 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int t;
  8.     cin>>t;
  9.     while(t--){
  10.         int a, b, c;
  11.         cin>>a>>b>>c;
  12.  
  13.         vector<int> v[1010];
  14.         int cost[700][700];
  15.  
  16.         for(int i=0;i<b;i++){
  17.             int x, y, z;
  18.             cin>>x>>y>>z;
  19.  
  20.             v[x].push_back(y);
  21.             v[y].push_back(x);
  22.  
  23.             cost[x][y]=z;
  24.             cost[y][x]=z;
  25.         }
  26.  
  27.         int time[1010];
  28.         int visit[1010];
  29.         memset(time,10000000,sizeof(time));
  30.         memset(visit,0,sizeof(visit));
  31.  
  32.         queue<int> q;
  33.         q.insert(1);
  34.         visit[1]=1;
  35.         while(!q.empty()){
  36.             int x=q.front();
  37.  
  38.  
  39.         }
  40.  
  41.  
  42.     }
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement