Just a runnable solution
Code\n\nimpl Solution {\n    pub fn min_moves(nums: Vec<i32>, limit: i32) -> i32 {\n        let n = nums.len();\n        let mut v = vec![0; 2 * limit as usize 
# Code\n```\nimpl Solution {\n    pub fn min_moves(nums: Vec<i32>, limit: i32) -> i32 {\n        let n = nums.len();\n        let mut v = vec![0; 2 * limit as usize + 2];\n        let mut ans = std::i32::MAX;\n        for i in 0..n / 2 {\n            let l = nums[i].min(nums[n - i - 1]) + 1;\n            let mid = nums[i] + nums[n - i - 1];\n            let r = nums[i].max(nums[n - i - 1]) + limit + 1;\n            v[2] += 2;\n            v[l as usize] -= 1;\n            v[mid as usize] -= 1;\n            v[mid as usize + 1] += 1;\n            v[r as usize] += 1;\n        }\n        for i in 2..2 * limit as usize + 2 {\n            v[i] += v[i - 1];\n            ans = ans.min(v[i]);\n        }\n        ans\n    }\n}\n```
['Rust']