网页资讯视频图片知道文库贴吧地图采购
进入贴吧全吧搜索

 
 
 
日一二三四五六
       
       
       
       
       
       

签到排名:今日本吧第个签到,

本吧因你更精彩,明天继续来努力!

本吧签到人数:0

一键签到
成为超级会员,使用一键签到
一键签到
本月漏签0次!
0
成为超级会员,赠送8张补签卡
如何使用?
点击日历上漏签日期,即可进行补签。
连续签到:天  累计签到:天
0
超级会员单次开通12个月以上,赠送连续签到卡3张
使用连续签到卡
05月19日漏签0天
noip吧 关注:25,165贴子:642,105
  • 看贴

  • 图片

  • 吧主推荐

  • 视频

  • 游戏

  • 1回复贴,共1页
<<返回noip吧
>0< 加载中...

问个题目 ,技能树的

  • 只看楼主
  • 收藏

  • 回复
  • 浮生到处悠然
  • NOI铜牌
    10
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
http://202.197.224.59/OnlineJudge2/index.php/Problem/read/id/1208
求思路!!!!


  • 浮生到处悠然
  • NOI铜牌
    10
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
Problem Description
We are familiar with the skill tree in different game. If you wanna get a new skill, you must get some base skill first. Let's simplify the problem: There is a inverse-triangle skill tree, with each node assigned a power value. If you wanna get a skill, you must get its left-upper and right-upper skill first. for example:
1 2 3 4 1 7 1 2 2 9 You must get the skill with power 2 and 3 to get the skill with power 7. Because of the lack of skill point, we could only get M skills. What's the maximum power value we can get?
Input
The first line is the number of testcase T (T≤20). Each case start with two numbers N (N≤47) and M (M≤474), represent the size of skill tree and skill point. Next N line, for each line i, there're N-i+1 numbers which represent the skill tree. Each number will between 0 and 1000.
Output
Output case number first, then the answer.
Sample Input14 51 1 1 11 2 11 11Sample OutputCase 1: 6


登录百度账号

扫二维码下载贴吧客户端

下载贴吧APP
看高清直播、视频!
  • 贴吧页面意见反馈
  • 违规贴吧举报反馈通道
  • 贴吧违规信息处理公示
  • 1回复贴,共1页
<<返回noip吧
分享到:
©2025 Baidu贴吧协议|隐私政策|吧主制度|意见反馈|网络谣言警示