OJ题
葛济维的博客
总想日更博客的小白
展开
-
Parencodings(POJ1068 )
Let S = s1 s2…s2n be a well-formed string of parentheses. S can be encoded in two different ways:q By an integer sequence P = p1 p2…pn where pi is the number of left parentheses before the ith right ...原创 2020-10-03 22:15:12 · 90 阅读 · 0 评论 -
单词数(HDU 2072)
lily的好朋友xiaoou333最近很空,他想了一件没有什么意义的事情,就是统计一篇文章里不同单词的总数。下面你的任务是帮助xiaoou333解决这个问题。Input有多组数据,每组一行,每组就是一篇小文章。每篇小文章都是由小写字母和空格组成,没有标点符号,遇到#时表示输入结束。Output每组只输出一个整数,其单独成行,该整数代表一篇文章里不同单词的总数。Sample Inputy...原创 2020-10-03 22:10:59 · 242 阅读 · 0 评论 -
POJ:1328 Radar Installation 题目大意 解题思路 结论 代码
Assume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a point locating in the sea side. And any radar installation, locating on the ...原创 2020-09-10 16:48:03 · 138 阅读 · 0 评论 -
hdu5762 Teacher Bo(曼哈顿距离的应用m = |x1-x2|+|y1-y2|.)
Teacher BoBo is a geography teacher in the school.One day in his class,he marked N points in the map,the i-th point is at (Xi,Yi).He wonders,whether there is a tetrad (A,B,C,D)(A<B,C<D,A≠CorB≠D)...原创 2020-08-31 14:06:34 · 257 阅读 · 0 评论 -
Ants(POJ 1852) (UVa:10714)
An army of ants walk on a horizontal pole of length l cm, each with a constant speed of 1 cm/s. When a walking ant reaches an end of the pole, it immediatelly falls off it. When two ants meet they tu...原创 2020-08-31 14:06:19 · 85 阅读 · 0 评论