[DP] 公路乘车
来源:互联网 发布:通达即时通讯端口 编辑:程序博客网 时间:2024/04/27 14:11
var dp:array[0..100]of longint; i,j:longint; x:array[0..10]of longint; n:longint;function min(a,b:longint):longint;begin if a>b then exit(b) else exit(a);end;begin for i:=1 to 10 do read(x[i]); readln; readln(n); for i:=1 to n do dp[i]:=50000; for i:=1 to n do for j:=1 to 10 do if i-j>=0 then dp[i]:=min(dp[i-j]+x[j],dp[i]); writeln(dp[n]);end.
0 0
- [DP] 公路乘车
- [区间DP]Tyvj1015 公路乘车
- Tyvj P1015 公路乘车 (DP)
- 公路乘车
- 公路乘车
- tyvj p1015公路乘车-动态规划dp-完全背包
- Tyvj 1015 公路乘车
- HSACM 1503 公路乘车
- TYVJ 1015 - 公路乘车
- Tyvj P1015 公路乘车
- tyvj P1015 公路乘车
- Tyvj P1015 公路乘车
- TYVJ 1015 公路乘车
- 公路乘车(完全背包)
- 【动态规划】公路乘车 tyvj1015
- 公路乘车(完全背包)
- 1234: 01背包 公路乘车
- |Tyvj|动态规划|P1015 公路乘车
- X1 Fn键失灵
- SpringMVC参数传递
- IP Address
- iOS 自定义子视图获取所在的父控制器
- Quick Reference:php5 Xdebug 生成Profiles
- [DP] 公路乘车
- poj 2299 Ultra-QuickSort
- UITabBarController用法详解 - iOS - UI基础知识总结15
- Source Insight配置教程
- sqlite数据库读写在linux下的权限问题
- c++栈和队列
- 排列熵算法简介及c#实现
- iOS-项目开发,细节,报错,处理(1)
- java最基本的四个数据类型大小和范围