PROBLEM DESCRIPTION

A battalion is a military unit with 300 to 1200 soldiers usually consisting of seven companies commanded either by a lieutenant colonel or a colonel.

A particular training that a battalion undergoes is the training to maximize the battalion's "carrying capacity" whenever they are to carry cargoes from point A to point B. This usually happens when convoys full of supplies, guns, and ammunition are delivered and they have to put it away into a safehouse by foot.

The premise: Each soldier has a maximum carrying capacity (often in Kilograms). Most of the time, this is engraved into his official dog-tag for the colonel's reference. The command is to carry only one cargo per soldier. A scenario where two or more soldiers are carrying a single cargo, when it is still possible for them to carry one each, is considered to be inefficient (Tracy, 2008 - Principle of Forced Efficiency).

For this particular problem, assume that the number of soldiers per test case always equal that of the number of cargoes.

INPUT FORMAT (INPUT FILE: cp01.in)

The input file begins with an integer T, 0 < T ≤ 100, which defines the number of test cases. Each test case consists of 3 lines. The first line contains an integer N, where 0 < N ≤ 1200, that specifies the number of cargoes. The second and third lines each contain exactlyNpositive integers whose values do not exceed100. The integers on the second line are the weights of the cargoes and the integers on the third line are the weight limits both in kilograms.

OUTPUT FORMAT (OUTPUT FILE: cp01.out)

For each test case, output the maximum number of cargoes that the selected soldiers from the battalion can carry in one wave if they are restricted to carry only one cargo per soldier.

SAMPLE INPUT

2

3

10 30 20

30 10 20

5

9 7 16 4 8

8 3 14 10 10

SAMPLE OUTPUT

3

4

what would be the code to output 3 4 from the input above?help pls.

*Edited 3 Years Ago by azurekite*