csu1804】的更多相关文章

/* csu 1804 因为define和const总出错,到现在也不明白为什么 不知道define 和 const 出来的 mod 有什么区别 */ #include<iostream> #include<cstdio> #include<queue> #include<cstring> using namespace std; const int mod = 1000000000+7; long long ans[100000+10]; long lon…
题目链接[https://vjudge.net/problem/CSU-1804] 题意: 给出一个有向无环图,然后让你算下面的结果,count(i,j)表示i->j之间的路径条数. 题解: 根据公式,可以把SUMa[i]提出来,然后对于没给我i点求SUMcount(i,j)*bj; #include<bits/stdc++.h> using namespace std; typedef long long LL; const int mod = 1e9 + 7; const int m…