原文:1014 Waiting in Line (30 分)

Suppose a bank hasNwindows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. The rules for the customers to wait in line are: The space in ...

2019-08-04 20:41 0 533 推荐指数:

查看详情

PAT甲题题解-1014. Waiting in Line (30)-模拟,优先级队列

题意:n个窗口,每个窗口可以排m人。有k为顾客需要办理业务,给出了每个客户的办理业务时间。银行在8点开始服务,如果窗口都排满了,客户就得在黄线外等候。如果有一个窗口用户服务结束,黄线外的客户就进来一个 ...

Fri Apr 21 04:37:00 CST 2017 0 1214
PTA 词频统计(30

词频统计(30 ) 请编写程序,对一段英文文本,统计其中所有不同单词的个数,以及词频最大的前10%的单词。 所谓“单词”,是指由不超过80个单词字符组成的连续字符串,但长度超过15的单词将只截取保留前15个单词字符。而合法的“单词字符”为大小写字母、数字和下划线 ...

Tue Mar 13 07:14:00 CST 2018 0 989
7-4 Dijkstra Sequence (30)

Dijkstra's algorithm is one of the very famous greedy algorithms. It is used for solving the single ...

Sat Jul 25 03:42:00 CST 2020 0 605
7-1 词频统计 (30 )

词频统计 参考: 对参考的代码进行了一些补充和修改,大体思路没变 并不是想说这题多难,只是在这题可以用STL的很多结构帮助解题,所以能让代码变得很简单 题目 7-1 词频统计 (30 ) 请编写程序,对一段英文文本,统计其中所有不同单词的个数,以及词频最大的前10%的单词。 所谓“单词 ...

Sun Jun 09 06:30:00 CST 2019 0 970
6-1 Is Topological Order (30 )

Write a program to test if a give sequence Seq is a topological order of a given graph Graph. Forma ...

Sat Nov 06 05:09:00 CST 2021 0 261
7-2 天梯地图 (30

7-2 天梯地图 (30 ) 本题要求你实现一个天梯赛专属在线地图,队员输入自己学校所在地和赛场地点后,该地图应该推荐两条路线:一条是最快到达路线;一条是最短距离的路线。题目保证对任意的查询请求,地图上都至少存在一条可达路线。 输入格式: 输入在第一 ...

Sun Nov 04 00:55:00 CST 2018 0 759
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM