ThoughtWorks 笔试题 Trains C++版实现

本文介绍了ThoughtWorks的一道笔试题——Trains问题,涉及使用C++编程计算有向图中城镇之间的特定路线距离、不同路线数量、最短路线长度等。并给出了测试输入和预期输出。
摘要由CSDN通过智能技术生成

本文内容转自互联网(百度文库)

Problem one: Trains

 Thelocal commuter railroad services a number of towns in Kiwiland. Because ofmonetary concerns, all of the tracks are 'one-way.' That is, a route fromKaitaia to Invercargill does not imply the existence of a route fromInvercargill to Kaitaia. In fact, even if both of these routes do happen toexist, they are distinct and are not necessarily the same distance!

 Thepurpose of this problem is to help the railroad provide its customers withinformation about the routes. In particular, you will compute the distancealong a certain route, the number of different routes between two t

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值