-->
当前位置:首页 > 题库

PROGRAMMING:Public security management

Luz5年前 (2021-05-10)题库457
###Task description
```
SZ city is a special economic zone established by China's reform and opening up. It is the window of China's reform and opening up. It has developed into an international city with certain influence and created the world-renowned "SZ speed". SZ has the largest number of ports, the largest number of entry-exit personnel and the largest traffic volume in China
In order to maintain the social order of SZ special economic zone and ensure the smooth progress of the reform, opening up and economic construction of SZ Special Economic Zone, the SZ comprehensive management committee of social order is specially set up to take charge of the comprehensive management of social order of SZ special economic zone. The public security organ is the Department in charge of public security. It carries out public security administration in accordance with the provisions of laws and regulations, cracking down on illegal and criminal acts disturbing public security, and maintaining social order.
YYH large-scale event will be held during the period of [S, F]. It is required that the number of police patrolling at any time during the event shall not be less than m. There will be n policemen in the public security organs to maintain the safety of the activities, and each of them will patrol for [AI, Bi]. Please check whether the current duty arrangement meets the requirements. If the requirements are met, output yes and the maximum number of people patrolling at the same time at a certain time; If it does not meet the requirements, output no, and output the minimum number of people patrolling at the same time at a certain time.
```
###Input format:
```
The first line: t indicates that there are t groups of test data (1 ≤ t ≤ 5) below
For each group of data, the next
First line: n m s f (1 ≤ n ≤ 10000 1 ≤ m ≤ 1000 0 ≤ s < f ≤ 100000)
The second line, A1, A2... An police patrol start time
The third line, B1, B2... BN end time of police patrol (0 ≤ AI ≤ Bi, I = 1... N)
```
###Output format:
```
For each group of test data, the output occupies one line. If the requirements are met, output yes and the maximum number of people patrolling at the same time at a certain time; If it does not meet the requirements, output no, and output the minimum number of people patrolling at the same time at a certain time( (one space in the middle)
```
###Input example:
```in
two
5 2 0 10
0 0 2 7 6
6 2 7 10 10
10 2 6 11
1 3 5 7 9 2 4 6 8 10
2 4 6 8 10 3 5 7 9 11
```
###Output example:
```out
YES 2
NO 1
```
###Title Source
Note: this topic is selected from nyoj website http://nyoj.top/problem/1364







answer:If there is no answer, please comment