시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
5 초 | 512 MB | 42 | 17 | 16 | 42.105% |
Mr. JOI is working at the IOI Pharmaceutical Co., Ltd. In this company, researchers are busy with experimental work to develop new sterilization sprays.
In this company, the strength of a sterilization spray is defined as follows: when we use a spray of strength x once for a culture plate with y bacteria, the number of bacteria on it becomes ⌊y/x⌋, which is the integer obtained from y/x by rounding off fractions. Now, a new spray of strength K is developed. In order to test the performance of this spray, they plan to experiment on it. They use N culture plates numbered 1, . . . , N. At the beginning, there are Ci bacteria on the culture plate i. In the experiment, they implement Q operations in sequence. Each operation is one of the following:
Mr. JOI is curious about the results of the experiment assuming that the new spray works as expected. Since you are a good programmer, he asks you to predict the results of the experiment.
Write a program which determines the numbers recorded by the operation 3s in the experiment.
Given the strength of the spray and the information on the operations in the experiment, write a program which determines the numbers recorded by the operation 3s.
Read the following data from the standard input.
Write the numbers recorded by the operation 3s in the experiment. The number of lines in the output is equal to the number of the operation 3s implemented in the experiment.
All input data satisfy the following conditions.
There are no additional constraints.
5 10 3 1 2 8 1 3 1 2 5 2 3 5 3 2 5 2 1 4 1 3 2 3 3 5 1 2 4 2 1 2 1 1 4 3 1 5
8 3 8
15 10 3 25 87 32 89 24 99 57 88 10 57 65 42 66 98 13 3 9 12 1 7 15 3 2 9 2 1 14 3 10 13 1 10 6 2 14 14 1 7 96 3 14 15 3 10 12
174 444 76 23 41