摘要:
题目:LayoutTime Limit:1000MSMemory Limit:65536KTotal Submissions:1772Accepted:856DescriptionLike everyone else, cows like to stand close to their friends when queuing for feed. FJ has N (2 <= N <=... 阅读全文
摘要:
floyd后遍历下就好代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--#include<iostream>#include<cstring>#include<cstdio>#include<climits&... 阅读全文
摘要:
SPFA找负环,当一个点入队的次数>=n时就证明出现了负环。代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--#include<iostream>#include<cstdio>#include<cstring&g... 阅读全文
摘要:
http://acm.xmu.edu.cn/JudgeOnline/problem.php?id=1165树状数组+二分写的代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--#include<iostream>#include<cs... 阅读全文
摘要:
首先建图,起始点为0点,终止点为1,金币数为边权值,如果有依赖关系则加一条边。然后枚举最短路上等级最高点,每次做最短路时需要满足level小于这个最高点,并且和其previous点等级差不超过m,最短路我使用了spfa.代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlight... 阅读全文
摘要:
http://acm.pku.edu.cn/JudgeOnline/problem?id=2367很水的拓扑排序,我DFS写的。代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--#include<iostream>#include<... 阅读全文