当前位置: 首页 > news >正文

ROADS

描述

N cities named with numbers 1 ... N are connected with one-way roads. Each road has two parameters associated with it : the road length and the toll that needs to be paid for the road (expressed in the number of coins).
Bob and Alice used to live in the city 1. After noticing that Alice was cheating in the card game they liked to play, Bob broke up with her and decided to move away - to the city N. He wants to get there as quickly as possible, but he is short on cash.

We want to help Bob to find the shortest path from the city 1 to the city N that he can afford with the amount of money he has.

输入

The first line of the input contains the integer K, 0 <= K <= 10000, maximum number of coins that Bob can spend on his way.
The second line contains the integer N, 2 <= N <= 100, the total number of cities.

The third line contains the integer R, 1 <= R <= 10000, the total num

相关文章:

  • Heavy Transportation
  • 八进制小数
  • 矩形分割
  • 删除数组中的元素(链表)
  • 统计学生信息
  • 【BZOJ 1588】营业额统计 【HNOI2002】【平衡树】【双向链表】
  • [Latex学习笔记]数学公式基本命令
  • 一些思考
  • 【BZOJ 1192】[HNOI2006]鬼谷子的钱袋
  • 【BZOJ 1800】[Ahoi2009]fly 飞行棋
  • 【BZOJ 2761】[JLOI2011]不重复数字
  • 【HDU 1599】find the mincost route 【最小环】
  • 【HDU 2833】WuKong 【Floyd】
  • 【NOIP2015】跳石头 【二分答案】
  • 【洛谷 1017】进制转换
  • 【跃迁之路】【463天】刻意练习系列222(2018.05.14)
  • avalon2.2的VM生成过程
  • CentOS 7 防火墙操作
  • django开发-定时任务的使用
  • Netty+SpringBoot+FastDFS+Html5实现聊天App(六)
  • Spring Cloud中负载均衡器概览
  • vue--为什么data属性必须是一个函数
  • vue总结
  • Vultr 教程目录
  • 初识 webpack
  • 分享几个不错的工具
  • 基于Volley网络库实现加载多种网络图片(包括GIF动态图片、圆形图片、普通图片)...
  • 前嗅ForeSpider教程:创建模板
  • 提升用户体验的利器——使用Vue-Occupy实现占位效果
  • 用Python写一份独特的元宵节祝福
  • 在GitHub多个账号上使用不同的SSH的配置方法
  • 智能网联汽车信息安全
  • Unity3D - 异步加载游戏场景与异步加载游戏资源进度条 ...
  • 阿里云服务器购买完整流程
  • 函数计算新功能-----支持C#函数
  • ​DB-Engines 11月数据库排名:PostgreSQL坐稳同期涨幅榜冠军宝座
  • ### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLTr
  • #define,static,const,三种常量的区别
  • #微信小程序:微信小程序常见的配置传值
  • $ git push -u origin master 推送到远程库出错
  • (1) caustics\
  • (Redis使用系列) Springboot 实现Redis消息的订阅与分布 四
  • (附源码)node.js知识分享网站 毕业设计 202038
  • (每日持续更新)jdk api之FileReader基础、应用、实战
  • (转载)在C#用WM_COPYDATA消息来实现两个进程之间传递数据
  • .NET Core MongoDB数据仓储和工作单元模式封装
  • .Net Core/.Net6/.Net8 ,启动配置/Program.cs 配置
  • .Net 高效开发之不可错过的实用工具
  • .NET/C# 编译期能确定的字符串会在字符串暂存池中不会被 GC 垃圾回收掉
  • .Net环境下的缓存技术介绍
  • .NET下的多线程编程—1-线程机制概述
  • @Controller和@RestController的区别?
  • @synthesize和@dynamic分别有什么作用?
  • []指针
  • [ABP实战开源项目]---ABP实时服务-通知系统.发布模式