URAL 1004. Sightseeing Trip
1. 题目 http://acm.timus.ru/problem.aspx?space=1&num=1004 1004. Sightseeing Trip Time limit: 0.5 second Memory limit: 64 MB There is a travel agency in Adelton town on Zanzibar island. It has decide…
Read more
learn, build, evaluate
1. 题目 http://acm.timus.ru/problem.aspx?space=1&num=1004 1004. Sightseeing Trip Time limit: 0.5 second Memory limit: 64 MB There is a travel agency in Adelton town on Zanzibar island. It has decide…
Read more
1. 题目 http://poj.org/problem?id=1125 Stockbroker Grapevine Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 31786 Accepted: 17416 Description Stockbrokers are known to overreact to rumours. …
Read more
Floyd–Warshall算法用于寻找有向图中任意两点间的最短路径,即多源最短路径。该算法可用于带负权边的图,但不能用于带负权环的图。该算法需要比较每一组节点间所有的路径,时间复杂度为Θ(|V|^3)。 设有一个图G,有N个节点,编号为1,2,…,N。函数shortestPath(i, j, k) 返回当仅使用点集{1,2,…,k}为中间节点时,从节点i到达节点j…
Read more