Home
Chef of Codechef help you to solve programming question of codechef.
For HacherRank Problem solving doubt visit below given link :-
https://hackofhackerrank.blogspot.com/2020/08/home.html
For any doubts in codechef question you may write in this as a comment.
For any doubts in codechef question you may write in this as a comment.
Winner Winner Chicken Dinner |
Chefina has two sequences A1,A2,…,AN and B1,B2,…,BN. She views two sequences with length N as identical if, after they are sorted in non-decreasing order, the i-th element of one sequence is equal to the i-th element of the other sequence for each i (1≤i≤N).
ReplyDeleteTo impress Chefina, Chef wants to make the sequences identical. He may perform the following operation zero or more times: choose two integers i and j (1≤i,j≤N) and swap Ai with Bj. The cost of each such operation is min(Ai,Bj).
You have to find the minimum total cost with which Chef can make the two sequences identical.
Sorry Manikanta for late reply, but for this question I require a sample of output and input of this if you can provide it to me in comment.
DeletePlease help me in solving this question
ReplyDeletehttps://www.codechef.com/problems/RGAME