摘要: 题目描述 给定长度为N的数列A,以及M条指令 (N≤500000, M≤100000),每条指令可能是以下两种之一:“2 x y”,把 A[x] 改成 y。“1 x y”,查询区间 [x,y] 中的最大连续子段和,即 max(x≤l≤r≤y)⁡ { ∑(i=l~r) A[i] }。对于每个询问,输出 阅读全文
posted @ 2019-08-06 20:54 Snow_in_winer 阅读(202) 评论(0) 推荐(0) 编辑
摘要: 题目描述 给定一个长度为N的数列A,以及M条指令 (N≤5*10^5, M<=10^5),每条指令可能是以下两种之一:“C l r d”,表示把 A[l],A[l+1],…,A[r] 都加上 d。“Q l r”,表示询问 A[l],A[l+1],…,A[r] 的最大公约数(GCD) 输入 第一行两个 阅读全文
posted @ 2019-08-06 20:18 Snow_in_winer 阅读(244) 评论(0) 推荐(0) 编辑
摘要: Array Without Local Maximums Shell Pyramid Gauss Elimination Simple Addition expression 题意:给出数n,在区间[0,n]中取值i,使得 (i) + (i+1) + (i+2), i>=0间的计算不会产生进位 统计 阅读全文
posted @ 2019-08-06 18:13 Snow_in_winer 阅读(189) 评论(0) 推荐(0) 编辑
摘要: permutation 2 Problem Description You are given three positive integers N,x,y.Please calculate how many permutations of 1∼N satisfies the following co 阅读全文
posted @ 2019-08-06 08:24 Snow_in_winer 阅读(309) 评论(0) 推荐(0) 编辑