Just a runnable solution
Code\n\nimpl Solution {\n    pub fn recover_array(nums: Vec<i32>) -> Vec<i32> {\n        let mut nums = nums;\n        nums.sort();\n        let n = nums.len() 
# Code\n```\nimpl Solution {\n    pub fn recover_array(nums: Vec<i32>) -> Vec<i32> {\n        let mut nums = nums;\n        nums.sort();\n        let n = nums.len() / 2;\n        let a = nums[0];\n        let mut v1 = Vec::with_capacity(n);\n        let mut v2 = Vec::with_capacity(n);\n        for i in 1..nums.len() {\n            let k = nums[i] - a;\n            if k % 2 == 1 || k == 0 || nums[i] == nums[i - 1] {\n                continue;\n            }\n            v1.clear();\n            v2.clear();\n            v1.push(a);\n            let mut x = 0;\n            for &num in nums.iter().skip(1) {\n                if x < v1.len() && num == v1[x] + k {\n                    v2.push(num);\n                    x += 1;\n                } else {\n                    v1.push(num);\n                }\n                if v1.len() > n || v2.len() > n {\n                    break;\n                }\n            }\n            if v1.len() != n || v2.len() != n {\n                continue;\n            }\n            let mut ans = Vec::with_capacity(n);\n            for i in 0..n {\n                ans.push((v1[i] + v2[i]) / 2);\n            }\n            return ans;\n        }\n        vec![]\n    }\n}\n```
['Rust']