99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

合肥生活安徽新聞合肥交通合肥房產生活服務合肥教育合肥招聘合肥旅游文化藝術合肥美食合肥地圖合肥社保合肥醫(yī)院企業(yè)服務合肥法律

COMP1117B代做、代寫Python程序設計
COMP1117B代做、代寫Python程序設計

時間:2025-05-06  來源:合肥網hfw.cc  作者:hfw.cc 我要糾錯



Assignment 4 P. 1 / 9
The University of Hong Kong
COMP1117B Computer Programming
Assignment 4
Due date: May 5, 2025 23:59
Reminders
You are reminded that the VPL system on HKU Moodle evaluates your program with full 
marks under the condition that your program output is the EXACT MATCH of the expected 
output. In other words, any additional or missing space character, newline character, etc.,
will be treated as errors and lead to 0 marks. Also, you are suggested to make more test 
cases on your own for testing your program.
Question 1 [50%]
Background 
In the busy corporate world, efficient meeting room management is crucial for maintaining 
productivity and avoiding scheduling conflicts. Imagine you are working for a company
planning a major office renovation of their headquarters. As part of this renovation, they 
need to decide how many meeting rooms to build in their new office to accommodate their 
busy schedule of meetings and ensure that all planned meetings can be held without 
conflicts.
To make an informed decision, they have collected data on the start and end times of all the 
meetings scheduled throughout workdays. Your task is to write a program that helps the 
company determine the minimum number of meeting rooms required to accommodate all 
the meetings to ensure that no two meetings overlap in the same room.
Task 
You are given a file with a list of meeting time intervals consisting of start and end times.
Write a program to determine the minimum number of meeting rooms required to host all 
the meetings.
Note that the end time is exclusive, meaning a meeting ends at time   can be followed by 
another meeting starting at the time  . Meeting times may overlap, but a single meeting 
room cannot be used for more than one meeting at a time.
Input File 
• The file contains   number of lines.
• Each line represents a meeting and consists of a pair of times in 24-hour format, 
where the first time is the start time and the second time is the end time
Program Input 
• The filename of the input file. You can assume the input file and your program are 
located in the same folder.
Assignment 4 P. 2 / 9
Program Output 
• An integer representing the minimum number of meeting rooms required.
Assumptions 
• 1 ≤  
• 00: 00 ≤            <          ≤ 23: 59 for all meetings
Example 
The input file (20250206.txt) has the following content.
09:00-10:00
09:30-13:00
11:00-12:00
12:00-12:10
15:00-16:00
When your program runs, the user enters the filename. The program will read the file and 
print the result:
20250206.txt
2
Remarks: 
• Meeting 2 (09:30-13:00) overlaps with Meeting 1 (09:00-10:00), Meeting 3 (11:00-
12:00) and Meeting 4 (12:00-12:10), so we need at least two rooms.
• Meeting 4 can start after Meeting 3 ends in the same room, so we need only two 
rooms in total.
Hints 
• Ensure you understand the problem requirements and constraints. There are many 
approaches to solving the problem. You are free to choose which approach to use 
based on your understanding and preference.
• One way to solve the problem is to check all possible combinations of meetings to 
find the minimum number of sets to include all meetings. This involves comparing 
each meeting with every other meeting to see if they overlap. While this method is 
straightforward in concept, it may lead to messy code.
• Another way to solve the problem is to sort the start and end times separately and 
then iterate through them to count the number of meeting rooms needed. This 
method can result in simpler code and has better time efficiency.
Assignment 4 P. 3 / 9
Question 2 [50%]
Background (Continued) 
After determining the number of meeting rooms required, the company encountered a 
problem that required them to change the plan. Due to budget constraints, the company
can only afford to build one meeting room during their renovation. To make the most 
efficient use of this single room, they need to schedule as many meetings as possible 
without any overlap. Now, your task is to help them find the maximum number of meetings 
that can be scheduled in this single room without any overlap.
Task 
Reuse the file in Question 1, which contains a list of meeting time intervals consisting of 
start and end times. Write another program to calculate the maximum number of meetings 
that can be scheduled in a single room without any overlap.
Program Output 
• An integer representing the maximum number of meetings that can be scheduled in 
a single room without any overlap.
Example 1 
Reuse the input file (20250206.txt) in Question 1.
09:00-10:00
09:30-13:00
11:00-12:00
12:00-12:10
15:00-16:00
When your program runs, the user enters the filename. The program will read the file and 
print the result:
20250206.txt
4
Remarks: 
• The maximum number of meetings that can be scheduled in a single room without 
any overlap are Meetings 1 (09:00-10:00), 3 (11:00-12:00), 4 (12:00-12:10) and 5
(15:00-16:00).
 
Assignment 4 P. 4 / 9
Example 2 
Another input file (20250207.txt) has the following content.
12:00-15:00
13:00-16:00
10:00-11:00
16:00-17:00
16:00-17:35
Program input and output:
20250207.txt
3
Remarks: 
• The maximum number of meetings that can be scheduled in a single room without 
overlap are Meetings [1 (12:00-15:00), 3 (10:00-11:00), 4 (16:00-17:00)] or [1, 3, 5
(16:00-17:35)].
• There may be more than one combination having the same maximum number of 
meetings without overlapping, but they will not affect the integer to be printed.
Hints 
• The most straightforward approach is to check all possible combinations of meetings
to find the maximum number of non-overlapping meetings. This method is 
straightforward, but the code might be messy.
• Another way to solve the problem is to sort the meetings by their end times and 
then go through them to select the maximum number of non-overlapping meetings. 
This method can result in simpler code and has a better time efficiency. 
o Think about using an approach where you always pick the meeting that ends 
the earliest and then move to the next meeting that starts after the current 
one ends. Track the end time of the last selected meeting to ensure there is 
no overlap with the next selected meeting.
o Learning how to sort a list of tuples may help with your implementation.
a = [(5, 2), (1, 6), (3, 4)]
# Sort by second item
a.sort(key=lambda x: x[1])
print(a)
# output: [(5, 2), (3, 4), (1, 6)]
Assignment 4 P. 5 / 9
Implementation Notes
1. You can assume that user inputs and the input file are always valid. That means you 
don’t need to consider cases not mentioned in the requirement.
2. Your program must strictly follow the input and output format. Do not print extra 
space characters. 
3. Do not presume the filename of the input file provided by the user. The input file is 
used to import data only. Do not modify the input file in your program.
4. You can use any built-in Python functions. Despite that, you can still complete this 
assignment using the techniques covered by lecture notes and tutorial notes.
5. After the submission deadline, we will grade your program with another set of input 
files and test cases. 
Submission
Submit your programs to Moodle. Late submissions will not be accepted.
• Submit your code as a Python file (.py). 
• The input files are included in the evaluation environment. You do not need to 
upload them.
Assignment 4 P. 6 / 9
Input File and Test Cases
The following input files and test cases are used during the submission period. After the 
submission deadline, another set of input files and test cases will be used for grading.




請加QQ:99515681  郵箱:99515681@qq.com   WX:codinghelp




 

掃一掃在手機打開當前頁
  • 上一篇:MSE 5760代做、代寫C/C++,Java程序
  • 下一篇:代做FIN7880、代寫Python編程語言
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    2025年10月份更新拼多多改銷助手小象助手多多出評軟件
    2025年10月份更新拼多多改銷助手小象助手多
    有限元分析 CAE仿真分析服務-企業(yè)/產品研發(fā)/客戶要求/設計優(yōu)化
    有限元分析 CAE仿真分析服務-企業(yè)/產品研發(fā)
    急尋熱仿真分析?代做熱仿真服務+熱設計優(yōu)化
    急尋熱仿真分析?代做熱仿真服務+熱設計優(yōu)化
    出評 開團工具
    出評 開團工具
    挖掘機濾芯提升發(fā)動機性能
    挖掘機濾芯提升發(fā)動機性能
    海信羅馬假日洗衣機亮相AWE  復古美學與現(xiàn)代科技完美結合
    海信羅馬假日洗衣機亮相AWE 復古美學與現(xiàn)代
    合肥機場巴士4號線
    合肥機場巴士4號線
    合肥機場巴士3號線
    合肥機場巴士3號線
  • 短信驗證碼 trae 豆包網頁版入口 目錄網 排行網

    關于我們 | 打賞支持 | 廣告服務 | 聯(lián)系我們 | 網站地圖 | 免責聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網 版權所有
    ICP備06013414號-3 公安備 42010502001045

    99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

          9000px;">

                亚洲一区二区三区视频在线| 中文字幕一区视频| 精品一区二区在线看| 亚洲成av人片一区二区三区 | 日韩精品一区二区三区在线观看| 成人av高清在线| 国产成人av自拍| 国产一区二区三区最好精华液| 日本成人在线看| 免费在线欧美视频| 久久精品72免费观看| 久久av资源站| 国产精品亚洲人在线观看| 国产高清不卡二三区| 丰满亚洲少妇av| 91丨国产丨九色丨pron| 日本精品一区二区三区四区的功能| 99久久久国产精品免费蜜臀| 91在线国产福利| 欧美日韩在线播放| 日韩精品在线一区二区| 国产欧美日韩在线视频| 亚洲美女少妇撒尿| 日韩精品国产精品| 国产成人免费高清| 91国产视频在线观看| 日韩三区在线观看| 国产精品人妖ts系列视频| 一区二区三区精品视频| 久久精品久久精品| 成人午夜电影小说| 欧美日本韩国一区| 国产日韩成人精品| 亚洲午夜久久久久久久久久久 | 欧美在线免费视屏| 欧美不卡一二三| 国产精品成人午夜| 免费精品视频在线| 99久久久久久| 精品动漫一区二区三区在线观看| 国产精品美女久久久久久| 亚洲图片一区二区| 成人晚上爱看视频| 欧美老女人第四色| 国产精品国产三级国产三级人妇 | 日韩一区二区三区电影在线观看| 久久久久久亚洲综合| 亚洲一二三区不卡| 成人午夜av电影| 欧美一区二区三区在线| 自拍偷拍亚洲激情| 久久99国产精品尤物| 一本色道a无线码一区v| 久久久一区二区三区| 午夜欧美2019年伦理| 成人在线综合网| 精品乱人伦小说| 偷拍日韩校园综合在线| 91在线porny国产在线看| 精品久久五月天| 天堂av在线一区| 97精品国产97久久久久久久久久久久 | 国产精品福利影院| 久久国产免费看| 欧美日韩精品一区二区三区蜜桃| 国产精品嫩草久久久久| 久久国产视频网| 91精品久久久久久久99蜜桃| 一区二区三区四区不卡视频| jvid福利写真一区二区三区| 久久久91精品国产一区二区精品 | av不卡免费电影| 久久久久久久久久看片| 日本午夜精品视频在线观看| 欧美午夜精品一区二区蜜桃| 亚洲人成网站色在线观看| 成人免费高清在线观看| 久久午夜色播影院免费高清| 日本vs亚洲vs韩国一区三区二区| 欧亚洲嫩模精品一区三区| 一级中文字幕一区二区| 日本韩国欧美国产| 亚洲精品国产一区二区精华液 | 在线看日本不卡| 中文字幕欧美日韩一区| 国产乱码精品1区2区3区| 精品美女在线播放| 久久疯狂做爰流白浆xx| 精品国偷自产国产一区| 免费观看成人av| 日韩精品一区二区三区在线观看| 丝袜国产日韩另类美女| 91精品国产综合久久小美女| 亚洲va中文字幕| 欧美精品日日鲁夜夜添| 视频一区中文字幕| 精品黑人一区二区三区久久 | 91日韩在线专区| 一区二区三区精品在线| 欧美人与z0zoxxxx视频| 日本欧美肥老太交大片| 久久久亚洲欧洲日产国码αv| 国产精品资源站在线| 中文字幕不卡在线播放| 成人一道本在线| 亚洲香肠在线观看| 日韩亚洲欧美成人一区| 国产一区在线观看视频| 日本一区二区高清| 一本色道久久综合亚洲aⅴ蜜桃| 一区二区在线免费观看| 日韩欧美中文字幕一区| 丁香婷婷综合色啪| 亚洲男同1069视频| 91精品欧美福利在线观看| 国产一二三精品| 亚洲男人天堂一区| 免费高清成人在线| 国产精品久久久久久久蜜臀| 欧美日精品一区视频| 精品一区二区综合| 日韩一区欧美一区| 欧美国产在线观看| 欧美天堂一区二区三区| 国产乱子伦一区二区三区国色天香| 亚洲国产精品精华液2区45| 欧美午夜片在线看| 成人中文字幕电影| 日韩电影免费一区| 国产精品三级电影| 在线不卡中文字幕播放| 99国产精品一区| 麻豆91在线看| 亚洲综合精品久久| 欧美国产一区二区在线观看| 欧美精品久久天天躁| av在线播放成人| 国模套图日韩精品一区二区| 亚洲chinese男男1069| 欧美国产视频在线| 欧美一级理论片| 一本色道a无线码一区v| 国产精品中文字幕欧美| 日韩黄色片在线观看| 日本一二三不卡| 精品福利一区二区三区| 欧美日韩免费观看一区三区| 国产呦精品一区二区三区网站| 午夜视黄欧洲亚洲| 亚洲欧美日韩中文播放| 中文字幕欧美三区| 国产欧美一区二区三区在线看蜜臀 | 亚洲乱码日产精品bd| 国产日本亚洲高清| 日韩免费视频线观看| 欧美日本免费一区二区三区| 色偷偷成人一区二区三区91| 成人深夜在线观看| 亚洲婷婷综合色高清在线| 中文字幕精品一区二区三区精品| 91麻豆精品国产91久久久久久| 91色视频在线| 色综合久久中文综合久久牛| caoporn国产一区二区| 国产精品一区二区91| 国内精品在线播放| 久久99精品国产麻豆不卡| 欧美成人官网二区| 欧美mv和日韩mv国产网站| 日韩三级中文字幕| 欧美大片顶级少妇| 精品国产污污免费网站入口| 精品国产一二三| 中文字幕不卡一区| 成人免费小视频| 亚洲精品一卡二卡| 一区二区三区成人在线视频 | 国产精品一区二区免费不卡| 国产精品一区二区在线观看不卡| 国产裸体歌舞团一区二区| 国产乱子伦一区二区三区国色天香| 精品一区二区免费| 国产成人a级片| 91丨九色丨尤物| 欧美日韩一区久久| 日韩一区二区影院| 久久久久综合网| 一区二区中文视频| 亚洲国产视频一区二区| 日韩电影一区二区三区| 国产在线观看免费一区| 色婷婷国产精品久久包臀| 4hu四虎永久在线影院成人| 欧美精品一区二区三区蜜桃视频 | 欧美日本乱大交xxxxx| 日韩欧美国产不卡| 国产精品免费视频观看| 一区二区三区在线免费| 麻豆国产精品一区二区三区 | 亚洲精品中文字幕在线观看|