大学的每个专业都要编制教学计划。假设任何专业都有固定的学习年限,每学年含两学期,每学期的时间长度和学分上限都相等。每个专业开设的课程都是确定的,而且课程的开设时间的安排必须满足先修关系。每个课程的先修关系都是确定的,可以有任意多门,也可以没有。每一门课程恰好一个学期。试在这样的情况下设置一个教学计划编制程序。三、基本要求:(1):输入参数:学期总数,一学期的学分上限,每门课的课程号,学分,直接先修关系的课程号。(2):课程号尽可能的集中在前几个学期中。(3):若无解,则报告错误信息;否则见教学计划输入到指定的文件中。(University of each professional must prepare teaching plans. Assume that any professional has a fixed period of schooling per academic year with two semesters, the length of time and credits per semester caps are equal. Each professional courses are determined, and arrangements to open the course must meet the Advanced Placement relations. Pre relations are determined in each course, can have any number of doors, or you do not. Each course just one semester. The trial in this case, an instructional planning procedures. Three basic requirements: (1): Input parameters: the relationship between the course of the semester, the total number, the maximum credit for a semester, the course number of each course, credits, direct Prerequisite number. (2): Course No. centralized as much as possible in the first few semesters. (3): If there is no solution, report the error message otherwise see teaching program input to the specified file.)