#include using namespace std; typedef long long LL; const int N=6; const int X=(1< q; q.push(s); while(!q.empty()){ int x=q.front(); // cerr<<"b "<=(int)1e9){ dis[i]=d; if(i==t)return true; q.push(i); } } } return false; } int cur[X]; int dfs(int x,int t,int f){ if(x==t)return f; int ans=0; for(int &i=cur[x];i>n>>m>>k; int sum=0; for(int i=0;i>x[i]>>y[i]>>z[i]; sum+=z[i]; } if(sum>1; if(test(mid)){ r=mid; } else{ l=mid+1; } } cout<>t; while(t--)work(); return 0; }