随笔分类 -  线段树

摘要:There are several ancient Greek texts that contain descriptions of the fabled island Atlantis. Some of these texts even include maps of parts of the i 阅读全文
posted @ 2018-09-18 12:39 hinata_hajime 阅读(103) 评论(0) 推荐(0) 编辑
摘要:题目地址:http://codeforces.com/contest/1042/problem/D 题意:给你n个数,问有多少个区间的和的值小于t 分析:区间和问题,常常用到前缀和来进行预处理,所以先预处理出前缀和数组sum sum[i]代表前i个数的和,那么sum[i]的贡献就是, 当i<k<=n 阅读全文
posted @ 2018-09-17 21:04 hinata_hajime 阅读(810) 评论(1) 推荐(0) 编辑
摘要:There is a company that has N employees(numbered from 1 to N),every employee in the company has a immediate boss (except for the leader of whole compa 阅读全文
posted @ 2018-09-17 00:26 hinata_hajime 阅读(167) 评论(0) 推荐(0) 编辑
摘要:XORConsider an array A with n elements. Each of its element is A[i] (1 ≤ i ≤ n). Then gives two integersQ, K, and Q queries follow. Each query, give y 阅读全文
posted @ 2018-04-26 17:01 hinata_hajime 阅读(263) 评论(0) 推荐(0) 编辑
摘要:Railway tickets were difficult to buy around the Lunar New Year in China, so we must get up early and join a long queue… The Lunar New Year was approa 阅读全文
posted @ 2018-04-13 17:15 hinata_hajime 阅读(147) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示