

 Task: Bank notesThe Byteotian Bit Bank (BBB) has the largest network of cash dispensers in the whole Byteotia. The BBB have decided to improve their dispensers and have asked you for help. The legal tender in Byteotia are bank notes of denominations b_{1}, b_{2},..., b_{n}. The BBB have concluded that the cash dispensers are to pay every sum in the smallest possible total number of notes.
TaskWrite a programme that:
InputIn the first line of the standard input the number of denominations is written n, 1 <= n <= 200. The second line contains n integers b_{1}, b_{2},..., b_{n}, 1 <= b_{1} < b_{2} < ... < b_{ n} <= 20 000, separated by single spaces. The third line contains n integers c_{1}, c_{2},..., c_{n}, 1 <= c_{i} <= 20 000, also separated by single spaces; c_{i} is the number of banknotes of denomination b_{i} left in the cash dispenser. In the last, fourth line of input there is one integer k  the sum to be paid off, 1 <= k <= 20 000. For the test data, you are free to assume that the sum k can be paid off in the available banknotes.
OutputThe first line of the standard output should contain one integer denoting the minimal total number of bank notes sufficient to pay the sum off k. The second line should contain n integers, separated by single spaces, denoting the numbers of notes of subsequent denominations used to pay off the sum k. If there are many solutions your programme should write any of them.
Print friendly version 