上一页 1 ··· 32 33 34 35 36 37 38 39 40 ··· 50 下一页
摘要: 题目连接:http://poj.org/bbs?problem_id=1511 求1到各点再回到1的最短路之和。 数据太大,只能用spfa?? 阅读全文
posted @ 2017-04-20 08:45 yijiull 阅读(101) 评论(0) 推荐(0) 编辑
摘要: 题目连接:https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2031 自己没想出,其实也不难。 首先判断图中是否存在环,若不存在则No cycle found 阅读全文
posted @ 2017-04-20 00:36 yijiull 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=4370 很久之前做的题了,今天做一道spfa的题忽然想起这道。。。 题目给出的是矩阵,对应图的 出度、入度 等。。 想到了求1到n的最短路,没想到求最小环的情况。。 有人说不好想,其实是理解不到位。。 想 阅读全文
posted @ 2017-04-20 00:24 yijiull 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 题目连接:https://vjudge.net/problem/UVA-10561 抄的别人的代码,大概能理解,自己写还很费劲,再练习。。。。 参考:http://www.cnblogs.com/cyb123456/p/5815570.html 阅读全文
posted @ 2017-04-19 20:58 yijiull 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 题目连接:https://vjudge.net/problem/UVALive-5059 开始学SG,, 输入a较大,无法递推出所有sg值,打表找规律。。 观察结果可得: sg[x]=(x%2==0)? x/2:sg[x/2]; 阅读全文
posted @ 2017-04-19 20:25 yijiull 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://vjudge.net/problem/UVALive-3905 阅读全文
posted @ 2017-04-18 17:17 yijiull 阅读(117) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://vjudge.net/problem/SCU-4445 阅读全文
posted @ 2017-04-18 15:41 yijiull 阅读(117) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://vjudge.net/problem/UVALive-3902 阅读全文
posted @ 2017-04-18 13:26 yijiull 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 题目连接:https://vjudge.net/problem/SCU-4444 分两种情况, 边少(m<1e5*2)的情况直接dijkstra 边可能会很多(因为是完全图),这种情况下用bfs,用set保证每个点只入队一次。 阅读全文
posted @ 2017-04-18 08:43 yijiull 阅读(421) 评论(0) 推荐(0) 编辑
摘要: 题目连接:https://vjudge.net/problem/UVALive-3971 阅读全文
posted @ 2017-04-17 23:20 yijiull 阅读(106) 评论(0) 推荐(0) 编辑
上一页 1 ··· 32 33 34 35 36 37 38 39 40 ··· 50 下一页