摘要:
1. 邻接矩阵 2.邻接表 阅读全文
摘要:
这是 DFS 系列的第一篇 。 首先给出一个重要的定理。该定理来自《算法导论》。 An undirected graph may entail some ambiguity in how we classify edges, since $(u,v)$ and $(v,u)$ are really 阅读全文
摘要:
//2015/6/2 const int MAX_N=1e5+10; int prev[MAX_N]; struct Edge{ int to, prev; }; Edge E[MAX_N<<1]; void add_edge(int &id){ scanf("%d%d", &u, &v); E[id].to=v; E[id].prev=prev[u]; ... 阅读全文
摘要:
传送门:欧拉路·二 #1181 : 欧拉路·二 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 在上一回中小Hi和小Ho控制着主角收集了分散在各个木桥上的道具,这些道具其实是一块一块骨牌。主角继续往前走,面前出现了一座石桥,石桥的尽头有一道火焰墙,似乎无法通过。小Hi注 阅读全文
摘要:
2015年辽宁省赛热身赛有一道高精度乘法 传送门:NEUOJ 1574 A*B 1574: A * B 题目描述 Calculate $a \times b$. Calculate $a \times b$. 输入 Your program will be tested on one or more 阅读全文
摘要:
One day, Nobita found that his computer is extremely slow. After several hours' work, he finally found that it was a virus that made his poor computer 阅读全文
摘要:
传送门:HDU 2896 病毒侵袭 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 14348 Accepted Submission(s): 3 阅读全文
摘要:
传送门:A Bug's Life Description Background Professor Hopper is researching the sexual behavior of a rare species of bugs. He assumes that they feature tw 阅读全文
摘要:
时间限制:5000ms单点时限:1000ms内存限制:256MB描述大家对斐波那契数列想必都很熟悉:$a_0 = 1, a_1 = 1, a_i = a_{i-1} + a_{i-2}, (i > 1)$。现在考虑如下生成的斐波那契数列:$a_0 = 1, a_i = a_j + a_k, i > 阅读全文