登录
首页 » 数据结构 » 程序存储问题:设有n 个程序{1,2,…, n }要存放在长度为L的磁带上。程序i存放在磁带上的长度是Li ,1≤i≤n 程序存储问题要求确定这n 个程序在磁带...

程序存储问题:设有n 个程序{1,2,…, n }要存放在长度为L的磁带上。程序i存放在磁带上的长度是Li ,1≤i≤n 程序存储问题要求确定这n 个程序在磁带...

于 2023-01-10 发布 文件大小:1.44 kB
0 177
下载积分: 2 下载次数: 1

代码说明:

程序存储问题:设有n 个程序{1,2,…, n }要存放在长度为L的磁带上。程序i存放在磁带上的长度是Li ,1≤i≤n 程序存储问题要求确定这n 个程序在磁带上的一个存储方案,使得能够在磁带上存储尽可能多的程序。 编程任务: 对于给定的n个程序存放在磁带上的长度,编程计算磁带上最多可以存储的程序数。 数据输入:由文件input.txt给出输入数据。第一行是正整数n,表示文件个数。接下来的1 行中,有n 个正整数,表示程序存放在磁带上的长度。 结果输出: input.txt output.txt 6 50 5 2 3 13 8 80 20 -program storage problem : There n procedures (1,2, ..., n) to be stored in the length of the L tape. I kept in the proceedings on the tape length is Li, 1 i n storage procedures to seek to establish that n procedures on tape storage of a program that allows the tape to store as much as possible the procedure. Programming tasks : to the n procedures stored in the tape length, calculated programming on tape can store up to the number of procedures. Data input : from the document input.txt given input data. The first line is a positive integer n, said the document number. Following a visit, n is an integer, said procedures stored on tape length. Results output : input.txt output.txt 6 50 5 2 3 13 8 80 20

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

发表评论

0 个回复

  • 用C++Builder写的数据结构队列问题的程序。希望对大家有用。
    用C++Builder写的数据结构队列问题的程序。希望对大家有用。-C Builder write queue data structure of the proceedings. We hope that the right useful.
    2022-02-05 23:23:42下载
    积分:1
  • 矩阵运算
    Matrix operations solution of AX=B Jordan and newton Methods
    2022-03-03 02:05:43下载
    积分:1
  • 这个程序主要是实现检查是否抄袭作业,它可以打开txt格式的文件,然后检查在所有存的文件中是否有雷同的,用了命令行参数和数据结构算法,很适合学习c++人做参考
    这个程序主要是实现检查是否抄袭作业,它可以打开txt格式的文件,然后检查在所有存的文件中是否有雷同的,用了命令行参数和数据结构算法,很适合学习c++人做参考-This program is mainly to achieve check copying operation, it can open the txt file format, and then check whether all documents are kept identical, with the command line parameters and data structure algorithms, well suited to learning c++ People to do reference
    2022-07-19 18:04:18下载
    积分:1
  • 模式识别matlab工具箱,包括SVM,ICA,PCA,NN等等模式识别算法,很有参考价值...
    模式识别matlab工具箱,包括SVM,ICA,PCA,NN等等模式识别算法,很有参考价值-pattern recognition Matlab toolbox, including SVM, ICA, PCA, NN pattern recognition algorithms, and so on, of great reference value
    2022-06-18 16:50:03下载
    积分:1
  • LTE Sim 流动
    * 本文件是 LTE Sim 的一部分* LTE Sim 是免费软件 ;你可以将它重新分发和/或修改* 根据 GNU 通用公共许可证版本 3 作为它由自由软件基金会 ; 的出版 ;* LTE Sim 被分布在希望它会有用的* 但不提供任何保证 ;没有甚至隐含的担保* 适销性或适合特定目的。请参见* GNU 通用公共许可证有关更多详细信息。*
    2022-02-24 20:31:28下载
    积分:1
  • 数学表达式计算和解析 用c语言编写的,内含有例.速度较快
    数学表达式计算和解析 用c语言编写的,内含有例.速度较快-Mathematical expression of the calculation and analysis using c language, contains Example. Fast
    2023-07-12 19:55:03下载
    积分:1
  • test1.txt中为要读入的英文文章,code.txt为生成的huffman编码,decoded.txt中为根据code.txt中内容解码后的结果。...
    test1.txt中为要读入的英文文章,code.txt为生成的huffman编码,decoded.txt中为根据code.txt中内容解码后的结果。-test1.txt is used to store the article in English to be read, code.txt contains generated the huffman codes, decoded.txt for the contents according to code.txt decoded results.
    2022-02-14 20:53:03下载
    积分:1
  • DELPHI processing data on the use EXCEL, it would be imported into the database...
    关于用DELPHI处理EXCEL数据,将它导入进数据库和从数据库导出到EXCEL文件,对初学者很有帮助。-DELPHI processing data on the use EXCEL, it would be imported into the database and exported to the EXCEL file from the database, useful for the beginner.
    2022-06-28 10:50:26下载
    积分:1
  • 编写一个程序,学生统计信息的结果(存储…
    编写一程序,统计学生的成绩信息(保存在文件Score.dat中)。 要求: 1. 能按总分,数学成绩,英语成绩,计算机成绩分别排序 2. 能分别统计数学,英语,计算机中不及格人数 3. 能按学号查找学生,并显示该学生信息。 注 1. 从文件中读入数据以及功能菜单显示已在文件ReadData.c 和Menu.c中给出; 2. 代码的总体结构已在文件Score.c中给出,并定义了一些函数头,但有关函数体代码和一些主程序处理代码要求学生填写,也可以修改函数头; 编译score.c即可 -prepared a procedure, the results of the students statistical information (stored in the document Score.dat). Requirements : 1. According to score, the math and English results, the computer results were 2 ranking. Statistics were able to mathematics, English, Computer failure number three. can search by school, students, and that the student information. Note 1. Read from the file into the data and functions of the menu showed the documentary and Menu.c ReadData.c given; 2. The overall code structure has been the Score.c given, and the definition of some of the first function, However, the body function code and address some main program code requiring students to complete, can also modify function first; compiler can s
    2022-08-20 01:05:35下载
    积分:1
  • Sphinx connect
    狮身人面像单位;
    2023-07-11 19:00:03下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载