1196: 汪老司机 Time Limit: 1000 MS Memory Limit: 257792 KB 64-bit interger IO format: %lld Java class name: Main Prev Submit Discuss Next 汪老司机是实验室出了名的老司机,早在大一就拿到了驾照,每年的暑假他都会带家人开车出游,今年的暑假也不例外,汪老司机今年准备带家人去平潭游玩,汪老司机的家离平潭有两条路,每条路都存在n个路段,两条路的n
题目链接:http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=21068 Yesterday Vasya and Petya quarreled badly, and now they don't want to see each other on their way to school. The problem is that they live in one and the same house, leave the hou
An Old but Classic Problem 给定一个$n$个点,$m$条边的带正权有向图.给定$s$和$t$,询问$s$到$t$的所有权和为正路径中,第$k$短的长度. Notice 定义两条路径不同,当且仅当它们的边集中存在一条边,使得它只在其中的一条路径上. Solution#1 Shortest Path & A* 对于Dijstra算法,有一个结论就是,当一个点第$k$次出队的时候,此时路径长度就是$s$到它的第$k$短路. 那为什么还要A*呢?我试了试,写了个Dijstra,
D. Destroying Roads 题目大意: In some country there are exactly n cities and m bidirectional roads connecting the cities. Cities are numbered with integers from 1 to n. If cities a and b are connected by a road, then in an hour you can go along this road
Problem Description A group of transformers whose leader is Optimus Prime(擎天柱) were assigned a mission: to destroy all Decepticon's(霸天虎) bases. The bases are connected by roads. They must visit each base and place a bomb there. They start their missi