莫队
Alstein
十年oi一场空,不开longlong见祖宗
展开
-
hdu4638 Group(莫队)
Problem DescriptionThere are n men ,every man has an ID(1…n).their ID is unique. Whose ID is i and i-1 are friends, Whose ID is i and i+1 are friends. These n men stand in line. Now we select an inte...原创 2020-01-27 12:00:06 · 106 阅读 · 0 评论 -
HDU6534 Chika and Friendly Pairs(树状数组+离散化+莫队)
Problem DescriptionChika gives you an integer sequence a1,a2,…,an and m tasks. For each task, you need to answer the number of “friendly pairs” in a given interval.friendly pair: for two integers ai...原创 2020-01-17 22:34:05 · 346 阅读 · 0 评论