Bonus 1 about binary search tree

Input consists of several test cases. For each test case, the first line
contains
two positive integers N (10) and L, which are the total number of
integers in an
insertion sequence and the number of sequences to be tested,
respectively. The
second line contains N positive integers, separated by a space, which
are the initially
inserted numbers. Then L lines follow, each contains a sequence of N
integers to be
checked.
Bonus 2 about hasing

Input consists of several test cases. For each test case, the first line
contains a
positive integer N (1000), which is the size of the hash table. The
next line
contains N integers, separated by a space. A negative integer represents
an empty
cell in the hash table. It is guaranteed that all the non-negative
integers are distinct
in the table.