38 人解决,71 人已尝试。
86 份提交通过,共有 328 份提交。
5.3 EMB 奖励。
单点时限: 3.0 sec
内存限制: 256 MB
Mr. Cui is working off-campus and he misses his girlfriend very much. After a whole night tossing and turning, he decides to get to his girlfriend’s city and of course, with well-chosen gifts. He knows neither too low the price could a gift be since his girlfriend won’t like it, nor too high of it since he might consider not worth to do. So he will only buy gifts with price in the range
There are
The first line contains two integers
The second line contains
Then
Output
5 3 1 2 1 3 2 1 2 2 4 3 1 2 5 4 5 1 3 1 1 1 1 3 5 2 3
7 1 4
This is originally a problem on HDU, but it is well-known that datasets on HDU is very weak, so that a lot of brute-force solutions got accepted. Mr. Cui is angry, as these solutions are not helpful when he is caught up with some tricky situations.
38 人解决,71 人已尝试。
86 份提交通过,共有 328 份提交。
5.3 EMB 奖励。