C# Simple - THE QUESTION IS MISLEADING, first i got confused we can choose only nodes from edges
Seems we can select any pair of nodes\n\n# Code\n\npublic class Solution {\n    public long MaximumValueSum(int[] nums, int k, int[][] edges) {\n        int len
Seems we can select any pair of nodes\n\n# Code\n```\npublic class Solution {\n    public long MaximumValueSum(int[] nums, int k, int[][] edges) {\n        int len=nums.Length;\n        int[] delta=new int[len];\n        long sum=0;\n        for(int i=0;i<len;i++)\n        {\n            delta[i]=(nums[i]^k)-nums[i];\n            sum+=nums[i];\n        }\n\n        Array.Sort(delta);\n\n        for(int i=len-1;i>0;i-=2)\n        {\n            long s=delta[i]+delta[i-1];\n            if(s<=0)\n                break;\n            \n            sum+=s;\n        }\n\n        return sum;\n    }\n}\n```
['C#']