#include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; const ll INF=1LL<<60; typedef pair P; typedef pair PP; const ll MOD=1e9+7; int main(){ int N,M; cin>>N>>M; vector sum(N); vector>> G(N); for(int i=0;i>a>>b>>c; sum[a]+=c; //aからbへ重みがc G[a].emplace_back(b,c); } for(int a=0;a ans(N,10.0); for(int t=1;t<=100;t++){ vector nxans(N,0); for(int a=0;a