ZOJ
文章平均质量分 85
--Simone-
这个作者很懒,什么都没留下…
展开
-
Count the Colors(线段树 + 延迟标记)
ask is counting the segments of different colors you can see at last. InputThe first line of each data set contains exactly one integer n, 1 <= n <= 8000, equal to the number of colored segments. Each of the following n lines consists of ex原创 2013-09-10 17:57:23 · 60 阅读 · 0 评论 -
Singles' Day(素数判断 + 进制转化)
e to celebrate their bachelor life. With the meaning of single or bachelor of number '1' and the huge population of young single man. This festival is very popular among young Chinese people. And many Young bachelors organize parties and Karaoke to meet ne原创 2014-03-02 16:29:51 · 282 阅读 · 0 评论 -
Median(Multiset )
2 numbers if m is odd. You have an empty number list at first. Then you can add or remove some number from the list. For each add or remove operation, output the median of the number in the list please. Input This problem has several test cases. The fir原创 2014-07-16 14:57:39 · 73 阅读 · 0 评论 -
Just Pour the Water(矩阵快速幂)
the water in A into B, and simultaneous pours half of the water in B into A. As the pouring continues, she finds it is very easy to calculate the amount of water in A and B at any time. It is really an easy job :). But now Shirly wants to know how to calc原创 2014-08-11 23:20:49 · 75 阅读 · 0 评论 -
LED Display(二分图 + 最小路径覆盖)
ind the LED have a serious problem, at the beginning, the seven bars were all on. But when one bar once was trun off, it can't be turn on again! So ecah LED only can display digit in certain oder. For example, one LED can display 9,3,7 successively, but ca原创 2014-08-17 12:45:49 · 445 阅读 · 0 评论 -
Untrusted Patrol(DFS)
in the factory. To ensure the safety of drinks, Edward hired a security man to patrol the warehouse. The warehouse has N piles of drinks and M passageways connected them (warehouse is not big enough). When the evening comes, the security man will start to原创 2014-09-09 16:07:50 · 51 阅读 · 0 评论 -
Design the city(LCA + RMQ)
ams everywhere. Now, Cerror finds out that the main reason of them is the poor design of the roads distribution, and he want to change this situation. In order to achieve this project, he divide the city up to N regions which can be viewed as separate poi原创 2014-10-09 13:15:48 · 72 阅读 · 0 评论 -
Domination(概率DP)
is friends. What's more, he bought a large decorative chessboard with N rows and M columns. Every day after work, Edward will place a chess piece on a random empty cell. A few days later, he found the chessboard was dominated by the chess pieces. That mea原创 2014-10-21 20:18:40 · 112 阅读 · 0 评论 -
Known Notation(分析模拟)
nown as postfix notation since every operator in an expression follows all of its operands. Bob is a student in Marjar University. He is learning RPN recent days. To clarify the syntax of RPN for those who haven't learnt it before, we will offer some exam原创 2014-10-28 17:46:14 · 89 阅读 · 0 评论