alextoledoglez / ArrayContain

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Write a program that takes input of integers N and M, followed by N more integers and then M more integers. For each of the last M numbers, the program outputs true, if that number was present in the array of N numbers, output False otherwise.?

Your output lines should not have any trailing or leading whitespaces In case of error your output should be 0

Constraints:

0 < N <= 20,000

0 < M <= 15,000

Input

4 2 99 12 10 23 23 25

Output

True False

Explanation:

An input of size 4 is taken, followed by 2 lines. 23 outputs True, since 23 is present in above array, 25 outputs false because it was not in the array of N integers.

About


Languages

Language:Java 100.0%