Marks :100
: 1 | : 0
Given two arrays A and B of the same length N. You can select a subset of A and increment them by 1. You can only do this at most once. You can also freely re-arrange elements in A.
Return True if A can be made into B, False otherwise.
The first line of the test case contains an integer N ($$$1 \le n \le 1e6 $$$)the length of arrays A and B.
The next line contains n spaced integers of array A that is ($$$a_i,a_{i+1}.......a_{n-1}$$$).
The next line contains n spaced integers of array B that is ($$$b_i,b_{i+1}......b{n-1}$$$).
For each test case print Yes or No if it is possible to make array A equal to array B or not.
5 1 2 3 4 5 5 1 1 3 4
NO
You need to login to view your submissions.
You need to login to view all submissions.
Result : Executed
Feel something is wrong with the test cases?
Result : Accepted
Test Cases :
But to Run or Submit the Problem, you need to Log In.
Continue to Log InYour challenge has been submitted successfully.
You will get a response soon via WhatsApp or Email.
Do let us know your issue.