
树状数组
文章平均质量分 81
nka_kun
ACMer
展开
-
CodeForces - 961E Tufurama(树状数组)
TufuramaOne day Polycarp decided to rewatch his absolute favourite episode of well-known TV series "Tufurama". He was pretty surprised when he got results only for season 7 episode 3 with his search q...原创 2018-05-09 22:07:36 · 409 阅读 · 0 评论 -
Wannafly挑战赛15 数字串(树状数组)
题目描述 一个只含数字的字符串,q次操作,每次操作将第i位数字改为x,每次操作后,统计长度在[l, r]之间且首数字大于尾数字的子串的个数。输入描述:第一行一个只含数字的字符串; 第二行3个整数q, l, r; 接下来q行,每行两个整数i, x。输出描述:输出q行,每行一个整数,表示长度在[l, r]之间且首数字大于尾数字的子串的个数。示例1输入585605 2 2 4 1 6 4 2输出7 8备...原创 2018-05-12 13:20:59 · 248 阅读 · 0 评论 -
HihoCoder - 1391(离线树状数组)
1391 : Countrie 时间限制:1000ms 单点时限:1000ms 内存限制:256MB 描述 There are two antagonistic countries, country A and country B. They are in a war, and keep launching missiles towards each other. It is know...原创 2018-09-11 22:27:53 · 325 阅读 · 0 评论 -
HDU - 6274 Master of Sequence
There are two sequences a1, a2, · · · , an, b1, b2, · · · , bn. Let S(t) =∑⌊(t−bi)ai⌋. . There are m operations within three kinds as following: • 1 x y: change value ax to y. • 2 x y: change value bx...原创 2018-10-13 10:57:49 · 307 阅读 · 0 评论