QOJ.ac

QOJ

حد الوقت: 3 s حد الذاكرة: 1024 MB مجموع النقاط: 100

#5660. 简化基因组翻译

الإحصائيات

翻译是将基因组信息(mRNA)转化为生物单位(蛋白质)的关键步骤。具体而言,它根据密码子表(表 1)将三个 RNA 核苷酸解析为一个氨基酸。

氨基酸 RNA 核苷酸
F UUU UUC
L UUA UUG CUU CUC CUA CUG
I AUU AUC AUA
M AUG
V GUU GUC GUA GUG
S UCU UCC UCA UCG AGU AGC
P CCU CCC CCA CCG
T ACU ACC ACA ACG
A GCU GCC GCA GCG
Y UAU UAC
H CAU CAC
Q CAA CAG
N AAU AAC
K AAA AAG
D GAU GAC
E GAA GAG
C UGU UGC
W UGG
R CGU CGC CGA CGG AGA AGG
G GGU GGC GGA GGG
STOP UAA UAG UGA

表 1:密码子表。

例如,给定一个 RNA 序列 $R = \text{CUCAGCGUUACCUAGUUUCAUUGUGCU}$,其三联体解析为 $\text{CUC AGC GUU ACC UAG UUU CAU UGU GCU}$,翻译出的氨基酸为 $P = \text{LSVT}$。注意 $\text{UAG}$ 是一个终止密码子,它会停止翻译过程。表 1 中有三个终止密码子:$\text{UAA}$、$\text{UAG}$ 和 $\text{UGA}$。

输入格式

第一行包含一个整数 $T$,表示测试用例的数量。接下来的每个测试用例包含一行,为一个 RNA 序列 $R$。

数据范围

  • $1 \le T \le 50$。
  • $R$ 是由字母表 $\Sigma = \{\text{A, C, G, U}\}$ 组成的序列。
  • $|R| = 3 * n$,其中 $1 \le n \le 333$。
  • $P$ 是由 $R$ 翻译得到的氨基酸序列,若存在终止密码子则在遇到时终止(即第一个测试用例的情况),若无终止密码子则翻译完整序列。终止密码子不会出现在 $P$ 的开头。
  • 所有字符串字符均为大写字母。

输出格式

对于每个测试用例,输出对应的翻译后的氨基酸序列 $P$。

样例

样例输入 1

5
UUUUAACACUUUAUCACUUAACACCAC
CAAAAUAUGAAAAAU
AUGUACUUUGCGUUUCACUAA
UUGCACUACUAC
UACGUGGGUAUC

样例输出 1

F
QNMKN
MYFAFH
LHYY
YVGI

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.