{"problem":{"name":"050. The Array Checker-inator!","description":{"content":"Given two arrays of integers, check if they are equal... But, if the arrays can be made equal through the removal of duplicates or sorting, they are equal.  The first line will represent the elements","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":1000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF10269050"},"statements":[{"statement_type":"Markdown","content":"Given two arrays of integers, check if they are equal... But, if the arrays can be made equal through the removal of duplicates or sorting, they are equal. \n\nThe first line will represent the elements, n, in the first array. Then, you will be given n integers inputted on their own lines. After that, another integer will be inputted, which represents the elements, m, in the second array. Then m integers will follow, all being inputted on separate lines.\n\nPrint \"YES\" (without the quotes) if you these arrays are equal (or if they are equal after removing duplicates and sorting them), or \"NO\" (without the quotes) if the arrays cannot be made equal.\n\n## Input\n\nThe first line will represent the elements, n, in the first array. Then, you will be given n integers inputted on their own lines. After that, another integer will be inputted, which represents the elements, m, in the second array. Then m integers will follow, all being inputted on separate lines.\n\n## Output\n\nPrint \"YES\" (without the quotes) if you these arrays are equal (or if they are equal after removing duplicates and sorting them), or \"NO\" (without the quotes) if the arrays cannot be made equal.\n\n[samples]","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"**Definitions**  \nLet $ A = (a_1, a_2, \\dots, a_n) $ be the first array of integers.  \nLet $ B = (b_1, b_2, \\dots, b_m) $ be the second array of integers.  \n\n**Constraints**  \n- $ n, m \\in \\mathbb{Z}^+ $  \n- $ a_i, b_j \\in \\mathbb{Z} $ for all valid indices  \n\n**Objective**  \nDefine $ \\text{UniqueSorted}(X) $ as the sorted list of unique elements of array $ X $.  \nOutput \"YES\" if $ \\text{UniqueSorted}(A) = \\text{UniqueSorted}(B) $, otherwise output \"NO\".","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF10269050","tags":[],"sample_group":[],"created_at":"2026-03-03 11:00:39"}}