Go, sort
Code\n\nfunc miceAndCheese(reward1 []int, reward2 []int, k int) int {\n\n    rewards := make([][]int, len(reward1))\n    for i := 0; i < len(reward1); i++ {\n  
# Code\n```\nfunc miceAndCheese(reward1 []int, reward2 []int, k int) int {\n\n    rewards := make([][]int, len(reward1))\n    for i := 0; i < len(reward1); i++ {\n        rewards[i] = []int{ reward1[i] - reward2[i], reward1[i], reward2[i] }\n    }\n    sort.Slice(rewards, func(i, j int) bool {\n        return rewards[i][0] > rewards[j][0]\n    })\n    \n    ans := 0\n    for _, r := range rewards[:k] {\n        ans += r[1]\n    }\n    for _, r := range rewards[k:] {\n        ans += r[2]\n    }\n    \n    return ans\n}\n```
['Sorting', 'Go']