Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- int main()
- {
- int t;
- cin>>t;
- while(t--){
- int a, b, c;
- cin>>a>>b>>c;
- vector<int> v[1010];
- int cost[700][700];
- for(int i=0;i<b;i++){
- int x, y, z;
- cin>>x>>y>>z;
- v[x].push_back(y);
- v[y].push_back(x);
- cost[x][y]=z;
- cost[y][x]=z;
- }
- int time[1010];
- int visit[1010];
- memset(time,10000000,sizeof(time));
- memset(visit,0,sizeof(visit));
- queue<int> q;
- q.insert(1);
- visit[1]=1;
- while(!q.empty()){
- int x=q.front();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement