743 Div-2 Problem B.

Revision en1, by Yashraj1402, 2021-09-19 13:38:35

Problem Link

My Approach:

Only make the first element of vector A less than vector B. So if B[0] < A[0], iterate over A and find the first element smaller than B[0] by this we will also know the number of swaps required to change the first element of A. Then iterate over B and find the first element greater than A[0] by this we will know the number of swaps required to change the first element of B. Print the minimum number of swaps.

solution Link ,546th test case fails.

Tags 743, div2, problem b

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Yashraj1402 2021-09-19 13:38:35 621 Initial revision (published)