随笔分类 - 数据结构
线段树、平衡树(Splay , treap)、可持久化数据结构、块状链表(莫队算法)、树链剖分算法
摘要:题目链接 Problem Description Let’s play a game.We add numbers 1,2...n in increasing order from 1 and put them into some sets.When we add i,we must create
阅读全文
摘要:题目链接 Problem Description Using regular expression to define a numeric string is a very common thing. Generally, use the shape as follows:(0|9|7) (5|6)
阅读全文
摘要:题目链接 Problem Description The French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e'. He was a member of the
阅读全文
摘要:题目链接 Problem Description Given two sequences of numbers : a[1], a[2], ...... , a[N], and b[1], b[2], ...... , b[M] (1 <= M <= 10000, 1 <= N <= 1000000
阅读全文
摘要:题目链接 Description During the War of Resistance Against Japan, tunnel warfare was carried out extensively in the vast areas of north China Plain. Genera
阅读全文
摘要:题目链接 Problem Description 很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。这让很多学生很反感。不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。 Input 本题目包含多
阅读全文
摘要:题目链接 Problem Description C国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C
阅读全文
摘要:题目链接 http://acm.hdu.edu.cn/showproblem.php?pid=5992 Problem Description There are N hotels all over the world. Each hotel has a location and a price.
阅读全文
摘要:题目链接 http://acm.hdu.edu.cn/showproblem.php?pid=5945 问题描述 输入描述 输出描述 输入样例 输出样例 题意:中文题,不再赘述; 思路: BC题解如下: 从后往前推,可以得到状态转移方程dp[i]=(dp[k*i],dp[i+l])+1{1<=l<=
阅读全文
摘要:题目链接 http://acm.hdu.edu.cn/showproblem.php?pid=5475 Problem Description One day, a useless calculator was being built by Kuros. Let's assume that numb
阅读全文
摘要:题目链接 https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=4923 problem description Last night, Kingd
阅读全文
摘要:题目链接 http://codeforces.com/problemset/gymProblem/100703/I Description standard input/outputStatements As a matter of fact, Dragon knows what Prince is
阅读全文
摘要:题目链接 http://vjudge.net/contest/137242#problem/D Description You're addicted to a little game called `remember the melody': you hear some notes, and th
阅读全文
摘要:题目链接 http://acm.hdu.edu.cn/showproblem.php?pid=5558 Problem Description Alice wants to send a classified message to Bob. She tries to encrypt the mess
阅读全文
摘要:题目链接 http://acm.hdu.edu.cn/showproblem.php?pid=5091 Problem Description Recently, the γ galaxies broke out Star Wars. Each planet is warring for resou
阅读全文
摘要:题目链接 http://acm.hdu.edu.cn/showproblem.php?pid=5925 Problem Description TanBig, a friend of Mr. Frog, likes eating very much, so he always has dreams
阅读全文
摘要:题目链接 https://acm.bnu.edu.cn/v3/contest_show.php?cid=8506#problem/A problem description As we know, the NTU Final PK contest usually tends to be pretty
阅读全文
摘要:题目链接 https://acm.bnu.edu.cn/v3/contest_show.php?cid=8504#problem/C 代码如下:
阅读全文
摘要:题目链接 http://codeforces.com/gym/100917/problem/D problem description Famous Berland coder and IT manager Linus Gates announced his next proprietary ope
阅读全文
摘要:题目链接 http://codeforces.com/gym/101102/problem/D problem description Given an R×C grid with each cell containing an integer, find the number of subrect
阅读全文

浙公网安备 33010602011771号