07 2019 档案
摘要:题目链接:http://codeforces.com/problemset/problem/449/B 分析:先把路和铁路都塞图里跑一遍优先队列的dijkstra(存图的时候要考虑重边,路无所谓,但是铁路需要只取最短并直接把答案加一次,也就是直接删掉这条铁路); 在进行dijikstra时储存到该节
阅读全文
摘要:题目链接:http://codeforces.com/gym/100923/problem/L 分析:题目要求序列首尾相同,在此基础上的字典序第k个;因为只存在a,b所以我们把它等效成0和1的话,字典序k也就是二进制下的k,将其最后一位与序列头部相同即可
阅读全文
摘要:http://codeforces.com/problemset/problem/598/D 分析:BFS,同一连通区域的周长一样,但查询过多会导致TLE,所以要将连通区域的答案储存,下次查询到该连通区域就可以直接得出结果
阅读全文
摘要:题目: In some social network, there are nn users communicating with each other in mm groups of friends. Let's analyze the process of distributing some n
阅读全文
摘要:题目: After coding so many days,Mr Acmer wants to have a good rest.So travelling is the best choice!He has decided to visit n cities(he insists on seein
阅读全文

浙公网安备 33010602011771号