文件名称:1
介绍说明--下载内容均来自于网络,请自行研究使用
新成立的 Drunbee 银行,在福州开辟了办事处。他们对每个客户都有一个确定且唯一的
编号 ID,去银行办理业务的客户都会得到一个优先级 P,并在休息室等候。该银行打破传统,
并非总是从休息室中取优先级最高的客户办理业务。因此,银行的服务系统需要完成以下功
能:
0 系统停止工作,并且不再受理之后的所有业务。
1 ID P 休息室增加了一个编号为 ID,优先级为 P 的客户
2 优先级最高的客户办理业务,并离开休息室
3 优先级最低的客户办理业务,并离开休息室
现在,你的任务当然是完成以上功能。 ★数据输入
每行数据都由以上三种功能中的一种构成,处理到系统停止工作。
保证系统会停止工作,且每个人的编号都不相同,每个人的优先级也都不相同。
输入数据少于 10^5 行,ID<=10^9,P<=10^9。 ★数据输出
对于每个功能 2 和功能 3,输出离开休息室客户的编号。
对于每个功能 2 和功能 3,若休息室没有客户,则输出 0。
每个输出占一行。 输入示例 输出示例
2
1 30 24
1 40 3
2
1 10 66
3
2
2
0
0
30
40
10
0-The newly established Drunbee Bank, opened offices in Fuzhou. Each customer has a determined and only
No. ID, go to the bank to transact business customers will get a priority P and wait in the lounge. The bank break with tradition,
Not always take the highest priority from the lounge customers to transact business. Therefore, banks need to complete the following functions
Be able to:
0 system stops working, all business and no longer be accepted.
1 ID P lounge increase a number ID, priority P of customers
2 highest priority customers to transact business, and leave the lounge
Lowest priority customers to transact business, and leave the lounge
Your task now, of course, is the completion of the above functions. ★ data input
Each row of data constituted by the above three functions in a processing system stops working.
To ensure that the system will stop working, and each person s ID is not the same, is also not the same as the priority of each person.
The input
编号 ID,去银行办理业务的客户都会得到一个优先级 P,并在休息室等候。该银行打破传统,
并非总是从休息室中取优先级最高的客户办理业务。因此,银行的服务系统需要完成以下功
能:
0 系统停止工作,并且不再受理之后的所有业务。
1 ID P 休息室增加了一个编号为 ID,优先级为 P 的客户
2 优先级最高的客户办理业务,并离开休息室
3 优先级最低的客户办理业务,并离开休息室
现在,你的任务当然是完成以上功能。 ★数据输入
每行数据都由以上三种功能中的一种构成,处理到系统停止工作。
保证系统会停止工作,且每个人的编号都不相同,每个人的优先级也都不相同。
输入数据少于 10^5 行,ID<=10^9,P<=10^9。 ★数据输出
对于每个功能 2 和功能 3,输出离开休息室客户的编号。
对于每个功能 2 和功能 3,若休息室没有客户,则输出 0。
每个输出占一行。 输入示例 输出示例
2
1 30 24
1 40 3
2
1 10 66
3
2
2
0
0
30
40
10
0-The newly established Drunbee Bank, opened offices in Fuzhou. Each customer has a determined and only
No. ID, go to the bank to transact business customers will get a priority P and wait in the lounge. The bank break with tradition,
Not always take the highest priority from the lounge customers to transact business. Therefore, banks need to complete the following functions
Be able to:
0 system stops working, all business and no longer be accepted.
1 ID P lounge increase a number ID, priority P of customers
2 highest priority customers to transact business, and leave the lounge
Lowest priority customers to transact business, and leave the lounge
Your task now, of course, is the completion of the above functions. ★ data input
Each row of data constituted by the above three functions in a processing system stops working.
To ensure that the system will stop working, and each person s ID is not the same, is also not the same as the priority of each person.
The input
(系统自动生成,下载前可以参看下载内容)
下载文件列表
1.txt