Simple Java Solution
Code\n\nclass Solution {\n    public int maximumSumSubsequence(int[] nums, int[][] queries) {\n        long sum=0;\n        for(int i=0;i<queries.length;i++)\n 
# Code\n```\nclass Solution {\n    public int maximumSumSubsequence(int[] nums, int[][] queries) {\n        long sum=0;\n        for(int i=0;i<queries.length;i++)\n        {\n            nums[queries[i][0]]=queries[i][1];\n            int a=nums[0],b=0;\n            for(int j=1;j<nums.length;j++)\n            {\n                int p=nums[j]+b;\n                p=Math.max(b,p);\n                b=Math.max(a,b);\n                a=p;\n            }\n            sum+=Math.max(a,b);\n        }\n        sum=sum%(1000000007);\n        return (int)sum;\n    }\n}\n```
['Java']