BFS&&DFS
文章平均质量分 79
ZSGG_ACM
既然选择了ACM了,那就好好爱它,不管风雨兼程.
展开
-
How far away ?(DFS)
How far away ?Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5766 Accepted Submission(s): 2166Problem DescriptionThere are n原创 2014-10-01 11:56:49 · 959 阅读 · 0 评论 -
B - Prime Path(BFS)
B -Prime PathTime Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uDescriptionThe ministers of the cabinet were quite upset by the message from the Chief of原创 2014-11-02 21:29:25 · 813 阅读 · 0 评论 -
D. Igor In the Museum(简单DFS)
先预处理出每一个联通块的答案,然后查询时就可以O(1)出答案;/* ***********************************************Author :xdloveCreated Time :2015年11月15日 星期日 16时47分40秒File Name :xdlove/codeforces/Educational_Codeforc原创 2015-11-15 17:11:13 · 888 阅读 · 0 评论