Stuck in Mud
All submissions for this problem are available.Codeland has a lot of rain this season. Due to rain, there is mud all over there on the ground. People of the Codeland find difficult to walk over muddy roads. Now, people of the Codeland wants a pair of shoes to overcome the problem of the muddy road. Every people of Codeland have different size of shoe fits to them except some. Codeland has only a shop of shoes with an unlimited amount of shoes. But the sizes of shoes available in the shop are limited.Mr. Chunk will be happy if he can provide all the sizes of the shoes which fit the Codeland people. If one of the customers remains who can’t find his shoe size on the shop then Mr Chunk will become upset. Your task is to find out whether Mr Chunk Will be happy or not. ###Input: - The first line of the input contains a single integer T denoting the number of test cases. - The first line of each test P denoting the sizes of shoes available on the shop. - The second Line contains P space Separated Integer. - The third line contains Q denoting the number of Codeland’s People. - The last line contains Q space separated Integers showing size of Codeland’s People shoes. ###Output: - For each test case print a single line “YES”; if Mr Chunk is happy Otherwise print “NO” ###Constraints - $1<=T<=10^5$ - $1<=Q,P<=10^3$ - $1<=p1,p2…<=10^6$ - $1<=q1,q2,..<=10^6$ ###Sample Input: 2 3 1 2 3 2 1 3 4 1 2 3 4 4 5 6 7 8 ###Sample Output: YES NO
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, PYPY, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, rust, SCALA, swift, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, SQL, kotlin, PERL6, TEXT, SCM chicken, PYP3, CLOJ, R, COB, FS|
Fetching successful submissions
If you are still having problems, see a sample solution here.