Game of Swapping Numbers
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述

Given two arrays A, B with length N, you should perform exactly K operations in array A.

For each operation, choose 2 elements  and swap the positions of A_i and A_j.

Please maximize .

输入描述:

The first line of input contains two integers , describing the length of A, B and number of operations.

The second line contains N integers .

The third line contains N integers .

输出描述:

Output one integer, the maximum answer.
示例1

输入

复制
3 2
1 2 3
3 2 1

输出

复制
4
示例2

输入

复制
3 2
1 2 3
1 2 3

输出

复制
4
示例3

输入

复制
3 1
1 2 3
3 2 1

输出

复制
4