![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
----栈
文章平均质量分 82
_Occult_
物語が始まった
展开
-
ZOJ 1016 Parencodings
Let S = s1 s2 ... s2n be a well-formed string of parentheses. S can be encoded in two different ways:By an integer sequence P = p1 p2 ... pn where pi is the number of left parentheses before the原创 2015-02-18 14:42:13 · 425 阅读 · 0 评论 -
CSU 1813 盖房子
DescriptionBobo 在 ICPCCamp 买了一块 n×m 的土地,其中有些格子是障碍。他想选择两个矩形区域,建造两座房子。 很明显,用于盖房子的区域不能包含障碍。同时,两个区域不能相交(但是可以相邻)。Bobo 想知道所有可能不同方案的数量除以 (109+7) 的余数。Input输入包含不超过 10 组数据。每组数据的第一行包含两个整数 n,m原创 2016-09-05 18:37:03 · 909 阅读 · 0 评论 -
CodeForces 475D CGCDSSQ
DescriptionGiven a sequence of integers a1, ..., an and q queries x1, ..., xq on it. For each query xi you have to count the number of pairs (l, r)such that 1 ≤ l ≤ r ≤ n and gcd(al, al + 1, ...原创 2016-09-02 15:17:19 · 551 阅读 · 0 评论 -
POJ 2559 Largest Rectangle in a Histogram
DescriptionA histogram is a polygon composed of a sequence of rectangles aligned at a common base line. The rectangles have equal widths but may have different heights. For example, the figure on原创 2016-08-29 16:54:29 · 423 阅读 · 0 评论 -
HDU 3410 Passing the Message
DescriptionWhat a sunny day! Let’s go picnic and have barbecue! Today, all kids in “Sun Flower” kindergarten are prepared to have an excursion. Before kicking off, teacher Liu tells them to stand原创 2016-08-03 17:36:31 · 552 阅读 · 0 评论 -
HDU 5783 Divide the Sequence
Problem DescriptionAlice has a sequence A, She wants to split A into as much as possible continuous subsequences, satisfying that for each subsequence, every its prefix sum is not small than 0.原创 2016-08-03 16:46:34 · 275 阅读 · 0 评论 -
HDU 5749 Colmerauer
Problem DescriptionPeter has an n×m matrix M. Let S(a,b) be the sum of the weight all a×b submatrices of M. The weight of matrix is the sum of the value of all the saddle points in the mat原创 2016-07-25 16:48:36 · 336 阅读 · 0 评论 -
HDU 5662 YJQQQAQ and the function
Problem DescriptionYJQQQAQ has an array A of length n. He defines a function fl,r,k where l,r,k are positive integers that satisfies l≤r and r×k≤n, and the value of the function equals to原创 2016-04-09 22:33:09 · 446 阅读 · 1 评论 -
FZU 1061 矩阵连乘
Description给定n个矩阵{A1,A2,...,An},考察这n个矩阵的连乘积A1A2...An。由于矩阵乘法满足结合律,故计算矩阵的连乘积可以有许多不同的计算次序,这种计算次序可以用加括号的方式来确定。矩阵连乘积的计算次序与其计算量有密切关系。例如,考察计算3个矩阵{A1,A2,A3}连乘积的例子。设这3个矩阵的维数分别为10*100,100*5,和5*50。若按(A1A2)原创 2016-03-17 21:17:20 · 1209 阅读 · 0 评论 -
FZU 2091 播放器
Descriptionshadow喜欢听音乐,于是v11自己写了个播放器送给了shadow,这个播放器有一个播放列表,一个“下一首”按钮,一个“上一首”按钮,还有一个播放记录。一开始播放器会播放播放列表中的第一首歌,当按下“下一首”按钮时,它会播放当前歌曲在播放列表中的下一首歌,若当前歌曲就是播放列表中的最后一首歌时,它仍会播放播放列表中的最后一首歌;当按下“上一首”按钮时,它会清除播原创 2016-03-03 18:40:53 · 386 阅读 · 0 评论 -
CSU 1655 文本计算器
Description Bob讨厌复杂的数学运算.看到练习册上的算术题,Bob很是头痛.为了完成作业,Bob想要你帮忙写一个文本版的四则运算计算器.这个计算器的功能需求十分简单,只要可以处理加减乘除和括号就可以了.你能够帮助Bob吗?Input每个样例一行,输入一个长度小于1500的包含有'(',')','+','-','*','/',和原创 2015-07-18 21:16:38 · 445 阅读 · 0 评论 -
UVA 10700 Camel trading
Camel tradingTime Limit: 1 secondBackgroundAroud 800 A.D., El Mamum, Calif of Baghdad was presented the formula 1+2*3*4+5, which had its origin in the financial accounts of a cam原创 2015-02-18 13:50:25 · 453 阅读 · 0 评论 -
HDU 1237 简单计算器
Problem Description读入一个只包含 +, -, *, / 的非负整数计算表达式,计算该表达式的值。Input测试输入包含若干测试用例,每个测试用例占一行,每行不超过200个字符,整数和运算符之间用一个空格分隔。没有非法表达式。当一行中只有0时输入结束,相应的结果不要输出。Output对每个测试用例输出1行,即该表达式的值,精确到小数原创 2015-03-14 14:06:47 · 408 阅读 · 0 评论 -
HDU 4041 Eliminate Witches!
Problem DescriptionKaname Madoka is a Magical Girl(Mahou Shoujo/Puella Magi). The duty of a Magical Girl is to eliminate Witches(Majo). Though sounds horrific, it is not a hard job for her as a po原创 2015-03-14 15:08:20 · 653 阅读 · 0 评论 -
HDU 3887 Counting Offspring
Font Size: ← →Problem DescriptionYou are given a tree, it’s root is p, and the node is numbered from 1 to n. Now define f(i) as the number of nodes whose number is less than i in all the succe原创 2015-02-19 16:34:49 · 512 阅读 · 0 评论 -
URAL 1992 CVS
Yoda: Visit I will the cloners on Kamino... And see this army they have created for the Republic.Cloners from the Kamino planet breed some of the finest clones. Such good results are due to the原创 2017-04-16 22:35:52 · 316 阅读 · 0 评论