Bsetcoder 65题解

Rank190,涨了波小分~~

1001 ZYB’s Biology

Problem Description

ZYB(ZJ−267)在NOIPNOIP拿到600分之后开始虐生物题,他现在扔给你一道简单的生物题:给出一个DNA序列和一个RNA序列,
问它们是否配对。
DNA序列是仅由A,C,G,T组成的字符串,RNARNA序列是仅由A,C,G,U组成的字符串。
DNA和RNA匹配当且仅当每个位置上A与U,T与A,C与G,G与C匹配。

Bsetcoder 61题解

很悲惨……就出了1道题,掉了38分……

1001 Game

Problem Description

XY在玩一个游戏:有N根柱子排成一排,编号为1到N,每个柱子上面有一块宝石,现在XY站在第S根柱子上,出口在第T跟柱子上,XY需要拿到所有宝石后从出口离开。每次XY可以走到相邻的柱子上,也可以使用超能力跳到第一根柱子或者第N根柱子上,如果离开了柱子之后再也不能到达这里。为了节省能量,XY想用最少次数超能力通关。

BestCoder赛码杯题解

1001 Movie (hdu 5214)

Problem Description

Cloud and Miceren like watching movies.
Today, they want to choose some wonderful scenes from a movie. A movie has N scenes can be chosen, and each scene is associate with an interval [L, R]. L is the beginning time of the scene and R is the ending time. However, they can’t choose two scenes which have overlapping intervals. (For example, scene with [1, 2] and scene with [2, 3], scene with [2, 5] and scene with[3, 4]).
Now, can you tell them if they can choose such three scenes that any pair of them do not overlap?
Since there are so many scenes that you can’t get them in time, we will give you seven parameters N, L1, R1, a, b, c, d, and you can generate L1 ~ LN, R1 ~ RN by these parameters.

POJ 1577

Falling Leaves

Problem Description

Figure 1 shows a graphical representation of a binary tree of letters. People familiar with binary trees can skip over the definitions of a binary tree of letters, leaves of a binary tree, and a binary search tree of letters, and go right to The problem.
A binary tree of letters may be one of two things:

  1. It may be empty.
  2. It may have a root node. A node has a letter as data and refers to a left and a right subtree. The left and right subtrees are also binary trees of letters.