Skip to content

Files

Latest commit

6c431cd · Sep 1, 2024

History

History

Post Transition

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Feb 8, 2021
Sep 1, 2024

We live in a big country. This country has towns in it. Each town has some post offices in which packages are stored and transferred.
Post offices have different inner structure. Specifically, each of them has some limitations on the packages it can store - their weight should be between and inclusively, where and are fixed for each office.
Packages are stored in some order in the office queue. That means, that they are processed using this order when sending and receiving.
Sometimes two post offices, even in different towns, may organize the following transaction: the first one sends all its packages to the second one. The second one accepts the packages that satisfy the weight condition for the second office and rejects all other ones. These rejected packages return to the first office back and are stored in the same order they were stored before they were sent. The accepted packages move to the tail of the second office's queue in the same order they were stored in the first office.
You should process several queries in your program. You'll be provided with structures , and . in order to complete this task, you should fill the following functions:






Sample Input 0


Sample Output 0


Explanation 0