ICode9

精准搜索请尝试: 精确搜索
  • UVA 10099 The Tourist Guide(最短路径 Floyd)2020-02-20 17:37:47

    题意:n个城市,m条路,一名导游要带领团队从开始城市到目标城市,但每条路上都有人数限制,导游可以分批次运送团队,问最少需几次。 思路:Floyd算法(多源最短路径), dis[i][j]=max(dis[i][j],min(dis[i][k],dis[k][j])),因为从起始点到目标点有多条路线,选择其中流量最大的,但一条路线方案有

  • floyd类型题UVa-10099-The Tourist Guide +Frogger POJ - 22532019-08-16 21:57:33

    The Tourist Guide  Mr. G. works as a tourist guide. His current assignment is to take some tourists from one city to another. Some two-way roads connect the cities. For each pair of neighboring cities there is a bus service that runs only between those tw

  • Codeforces1157A(A题)Reachable Numbers2019-07-24 17:51:34

    A. Reachable Numbers Let's denote a function f(x)f(x) in such a way: we add 11 to xx, then, while there is at least one trailing zero in the resulting number, we remove that zero. For example, f(599)=6f(599)=6: 599+1=600→60→6599+1=600→60→6; f(7)=

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有