登录
首页 » 数据结构 » 在一个圆形操场的四周摆放着n堆石子。现要将石子有次序地合并成一堆。规定每次只能选相邻的两堆石子合并成新的一堆,并将新的一堆石子数记为该次合并的得分。试设计一个算...

在一个圆形操场的四周摆放着n堆石子。现要将石子有次序地合并成一堆。规定每次只能选相邻的两堆石子合并成新的一堆,并将新的一堆石子数记为该次合并的得分。试设计一个算...

于 2022-03-22 发布 文件大小:2.08 kB
0 219
下载积分: 2 下载次数: 1

代码说明:

在一个圆形操场的四周摆放着n堆石子。现要将石子有次序地合并成一堆。规定每次只能选相邻的两堆石子合并成新的一堆,并将新的一堆石子数记为该次合并的得分。试设计一个算法,计算出将n堆石子合并成一堆的最小得分和最大得分,并分析算法的计算复杂度。-in a circle around the playground are placed n gravel pile. Is a stone should order to be merged into a heap. Stipulated that only elected adjacent to the pile of gravel into the new heap, and a new pile of gravel credited for the combined scores. Design a test algorithm to calculate n heap into a pile of gravel to the minimum score and the biggest score and analysis of algorithm complexity.

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • File Opearation:Read data from Files and cab be transferd format that you want
     ;文件O显示:读取数据从文件和cab可以传输您想要的格式。
    2022-02-02 16:00:06下载
    积分:1
  • 课程的电子教案,很好,很精彩,为初学者的好帮手。
    数据结构课程的电子教案,很好,很精彩,为初学者的好帮手。-Electronic data structure course lesson plans, very good, very exciting, a good helper for beginners.
    2023-07-20 17:00:04下载
    积分:1
  • //Carry out principal component of the Gaussian elimination method// function: s...
    // 带有列主元的高斯消元法 // 功能: 求解线性方程组 Ax = b // 参数: A - 指向n*n系数矩阵的指针 //     b - 常数向量的指针 //     n - 方程组的维数 // 返回值:0 - 如果成功。线性方程组的解保存在 b 中 //     1 - 求解失败-//Carry out principal component of the Gaussian elimination method// function: solving linear equations Ax = b// parameters: A- point n* n coefficient matrix of the pointer// b- constant vector pointer// n- Equations dimension// return value: 0- if successful. Linear equations the solution stored in the b in// 1- Solving the failure of
    2023-05-30 23:15:02下载
    积分:1
  • data structure
    数据结构――动态规划算法-data structure-- Dynamic Programming
    2023-08-05 10:50:03下载
    积分:1
  • 农夫过河问题
    应用背景运用VC6.0平台采用C++语言编写的农夫携带狼羊菜从河的 一岸过到另一岸关键技术用二进制数字符表示农夫和狼羊菜的位置,采用图的深度优先、数组、和实现的
    2022-07-10 11:47:22下载
    积分:1
  • data on the structure of the matrix transpose algorithm.
    关于数据结构中矩阵转置的算法。-data on the structure of the matrix transpose algorithm.
    2022-11-28 11:05:03下载
    积分:1
  • 采用vb写的资料系统管理器功能特别
    采用vb写的资料系统管理器功能特别-use of the information systems management function, particularly for
    2022-06-17 06:15:57下载
    积分:1
  • 中各种排序算法,中各种排序算法
    数据结构中各种排序算法,数据结构中各种排序算法-data structure various sequencing algorithms, data structures of various Sort Algorithm
    2022-11-05 13:10:04下载
    积分:1
  • 10名海盗抢得了窖藏的100块金子,并打算瓜分 这些战利品。这是一些讲民主的海盗(当然是他们自己特有的民主),他们的习惯 是按下面的方式进行分配:最...
    10名海盗抢得了窖藏的100块金子,并打算瓜分 这些战利品。这是一些讲民主的海盗(当然是他们自己特有的民主),他们的习惯 是按下面的方式进行分配:最厉害的一名海盗提出分配方案,然后所有的海盗(包 括提出方案者本人)就此方案进行表决。如果50%或更多的海盗赞同此方案,此方 案就获得通过并据此分配战利品。否则提出方案的海盗将被扔到海里,然后下提名 最厉害的海盗又重复上述过程-10 pirates seize a cache of 100 gold, and plan to divide up these spoils of war. This is the democracy of some pirates (of course it was their own unique democracy), their habits are based on the following manner allocation : one of the most powerful pirate proposed distribution plan, and then all the pirates (including the proposal himself) on this program for a vote. If 50% or more of the pirates agreed to this program, this program was adopted and on the allocation of spoils of war. Otherwise, the proposals will be pirates thrown into the sea, and then nominate the most serious piracy repeated this process
    2023-06-24 15:35:03下载
    积分:1
  • C语言实现中最短路径的算法代码,有图形显示。欢迎下载...
    C语言实现数据结构中最短路径的算法代码,有图形显示。欢迎下载-C language data structure, the shortest path algorithm code, a graphical display. Welcome to download
    2023-03-07 14:50:03下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载