Road ConstructionTime Limit:2000MSMemory Limit:65536KTotal Submissions:10141Accepted:5031DescriptionIt's almost summer time, and that means that it's ...
分类:
其他好文 时间:
2015-10-22 19:23:45
阅读次数:
231
Time Limit: 4000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4343Accepted Submission(s): 1541Problem Descriptio...
分类:
其他好文 时间:
2015-10-22 19:08:01
阅读次数:
211
BZOJ 1512 [POI2006]Pro-Professor Szu Tarjan缩点+拓扑DP...
分类:
其他好文 时间:
2015-10-20 08:03:37
阅读次数:
381
WA了好多次...先tarjan缩点, 然后题意就是求DAG上的一条最长链. dp(u) = max{dp(v)} + totu, edge(u,v)存在. totu是scc(u)的结点数. 其实就是记忆化搜一下...重边就用set判一下-------------------------------...
分类:
其他好文 时间:
2015-10-13 20:59:08
阅读次数:
297
Warm upTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 5093Accepted Submission(s): 1131Problem De...
分类:
其他好文 时间:
2015-10-13 15:09:43
阅读次数:
160
先Tarjan缩点,然后建反图拓扑看每一个点可以由哪里经过,用到bitset定义zt状态压缩一下,拓扑图中x->y :则表示y可以到达x,所以zt[y]=zt[y]|zt[x]就知道了y的,然后在for一下每个点及其所到达的点, Cgema算出两两乘积得出ans。 1 #define MAXN 2....
分类:
Web程序 时间:
2015-10-11 19:36:32
阅读次数:
236
Proving EquivalencesProblem DescriptionConsider the following exercise, found in a generic linear algebra textbook.Let A be an n × n matrix. Prove tha...
分类:
移动开发 时间:
2015-10-09 20:00:36
阅读次数:
264
Equivalent SetsProblem DescriptionTo prove two sets A and B are equivalent, we can first prove A is a subset of B, and then prove B is a subset of A, ...
分类:
其他好文 时间:
2015-10-09 19:47:46
阅读次数:
199
Network of SchoolsDescriptionA number of schools are connected to a computer network. Agreements have been developed among those schools: each school ...
分类:
移动开发 时间:
2015-10-03 13:06:31
阅读次数:
192
缩点+spfa最短路,因为最终不可能有环,所以直接spfa。 1 const maxe=1000001; 2 type 3 node=record 4 f,t:longint; 5 end; 6 var n,m,s,i,j,ans,cnt,num,u,x,dgr:long...