随笔分类 - 数据结构 树状数组
摘要:题面:4989: [Usaco2017 Feb]Why Did the Cow Cross the Road 连接 http://www.lydsy.com/JudgeOnline/problem.php?id=4989 题面 上下有两个位置分别对应的序列A、B,长度为n, 两序列为n的一个排列。当
阅读全文
摘要:E. DNA Evolution 题目连接: http://codeforces.com/contest/828/problem/E Description Everyone knows that DNA strands consist of nucleotides. There are four
阅读全文
摘要:E. Garlands 题目连接: http://www.codeforces.com/contest/707/problem/E Description Like all children, Alesha loves New Year celebration. During the celebra
阅读全文
摘要:Double Swords 题目连接: https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=4923 Description Last night
阅读全文
摘要:World is Exploding 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5792 Description Given a sequence A with length n,count how many quadruple (a,b,c,d
阅读全文
摘要:Bubble Sort 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5775 Description P is a permutation of the integers from 1 to N(index starting from 1). He
阅读全文
摘要:2743: [HEOI2012]采花 题目连接: http://www.lydsy.com/JudgeOnline/problem.php?id=2743 Description 萧芸斓是Z国的公主,平时的一大爱好是采花。 今天天气晴朗,阳光明媚,公主清晨便去了皇宫中新建的花园采花。花园足够大,容纳
阅读全文
摘要:E. Little Artem and Time Machine 题目连接: http://www.codeforces.com/contest/669/problem/E Description Little Artem has invented a time machine! He could
阅读全文
摘要:B. Bear and Displayed Friends 题目连接: http://www.codeforces.com/contest/658/problem/B Description Limak is a little polar bear. He loves connecting with
阅读全文
摘要:D. Nested Segments 题目连接: http://www.codeforces.com/contest/652/problem/D Description You are given n segments on a line. There are no ends of some seg
阅读全文
摘要:xiaoxin and his watermelon candy 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5654 Description During his six grade summer vacation, xiaoxin got lo
阅读全文
摘要:Annoying problem 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5293 Description Coco has a tree, whose vertices are conveniently labeled by 1,2,…,n.
阅读全文
摘要:D. Factory Repairs 题目连接: http://www.codeforces.com/contest/635/problem/D Description A factory produces thimbles in bulk. Typically, it can produce up
阅读全文
摘要:E. Zbazi in Zeydabad 题目连接: http://www.codeforces.com/contest/628/problem/D Description A tourist wants to visit country Zeydabad for Zbazi (a local ga
阅读全文
摘要:Flight Boarding Optimization 题目连接: http://codeforces.com/gym/100269/attachments Description Peter is an executive boarding manager in Byteland airport
阅读全文
摘要:<center Camping Groups</center 题目连接:http://codeforces.com/problemset/problem/173/E DescriptionA club wants to take its members camping. In order to ...
阅读全文
摘要:<center D. New Year and Ancient Prophecy</center 题目连接:http://www.codeforces.com/contest/611/problem/C DescriptionLimak is a little polar bear. In th...
阅读全文
摘要:代码: struct Bit { vector<int a; int sz; void init(int n) { sz=n; for(int i=1;i<=n+5;i++) a.push_back(0); } int lowbit(int x) { return x&( x); } int qu...
阅读全文
摘要:ZYB's GameTime Limit: 20 SecMemory Limit: 256 MB题目连接http://acm.hdu.edu.cn/showproblem.php?pid=5592DescriptionZYB has a premutation P,but he only remeb...
阅读全文