Huawei OD Online OJ:
Users who have already purchased this column, please private message the blogger to open an account and brush up questions online! ! !
Online OJ: brush the questions immediately
Question bank column: 2023 Huawei OD machine test (A volume + B volume) (C++JavaJSPy)
topic description
Maverick’s child’s birthday is coming soon, he plans to buy a cake and a small gift for the child, one cake and one small gift, and his budget does not exceed x yuan. Cakes and small gifts are available in a variety of price ranges.
Please return how many purchase options Mavericks have.
enter description
The first line indicates the unit price of the cake, separated by commas
The second line indicates the unit price of the gift, separated by commas
The third line represents x budget
output description
The output number represents the total number of purchase options
Remark
- 1 ≤ cake.length ≤ 10^5
- 1 ≤ gift.length ≤10^5
- 1 ≤ cake[i],gift[i] ≤ 10^5
- 1 ≤ X ≤ 2*10^5
Example
enter
10,20,5
5,5,2
15
output
6
illustrate:
Explanation: There are 6 purchase plans for calves, the selected egg