QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#104091 | #5660. Simplified Genome Translation | tarjen | AC ✓ | 1ms | 3412kb | C++17 | 1.8kb | 2023-05-08 16:26:51 | 2023-05-08 16:26:52 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
map<string,char> a;
void init()
{
a["UUU"] = 'F';
a["UUC"] = 'F';
a["UUA"] = 'L';
a["UUG"] = 'L';
a["CUU"] = 'L';
a["CUC"] = 'L';
a["CUA"] = 'L';
a["CUG"] = 'L';
a["AUU"] = 'I';
a["AUC"] = 'I';
a["AUA"] = 'I';
a["AUG"] = 'M';
a["GUU"] = 'V';
a["GUC"] = 'V';
a["GUA"] = 'V';
a["GUG"] = 'V';
a["UCU"] = 'S';
a["UCC"] = 'S';
a["UCA"] = 'S';
a["UCG"] = 'S';
a["AGU"] = 'S';
a["AGC"] = 'S';
a["CCU"] = 'P';
a["CCC"] = 'P';
a["CCA"] = 'P';
a["CCG"] = 'P';
a["ACU"] = 'T';
a["ACC"] = 'T';
a["ACA"] = 'T';
a["ACG"] = 'T';
a["GCU"] = 'A';
a["GCC"] = 'A';
a["GCA"] = 'A';
a["GCG"] = 'A';
a["UAU"] = 'Y';
a["UAC"] = 'Y';
a["CAU"] = 'H';
a["CAC"] = 'H';
a["CAA"] = 'Q';
a["CAG"] = 'Q';
a["AAU"] = 'N';
a["AAC"] = 'N';
a["AAA"] = 'K';
a["AAG"] = 'K';
a["GAU"] = 'D';
a["GAC"] = 'D';
a["GAA"] = 'E';
a["GAG"] = 'E';
a["UGU"] = 'C';
a["UGC"] = 'C';
a["UGG"] = 'W';
a["CGU"] = 'R';
a["CGC"] = 'R';
a["CGA"] = 'R';
a["CGG"] = 'R';
a["AGA"] = 'R';
a["AGG"] = 'R';
a["GGU"] = 'G';
a["GGC"] = 'G';
a["GGA"] = 'G';
a["GGG"] = 'G';
a["UAA"] = '1';
a["UAG"] = '1';
a["UGA"] = '1';
}
int main()
{
init();
int T;
cin >> T;
string s;
while (T--)
{
cin >> s;
string s1;int z=s.length();
for (int i=0;i<z;i+=3)
{
s1=s.substr(i,3);
if (a[s1]=='1') break;
cout << a[s1] ;
}
cout <<endl;
}
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3412kb
input:
5 UUUUAACACUUUAUCACUUAACACCAC CAAAAUAUGAAAAAU AUGUACUUUGCGUUUCACUAA UUGCACUACUAC UACGUGGGUAUC
output:
F QNMKN MYFAFH LHYY YVGI
result:
ok 5 lines
Test #2:
score: 0
Accepted
time: 0ms
memory: 3408kb
input:
50 GGUCAGAGGGAGGGCCUAUUGAUACGUAGUGGACUAUCAUGUUCGUGAGCAGCAUGCAGAUUACCCGUUCGGCGAGGGAGAGCCCGCUCCGAAAUGUUUAGGGAGAUAGCGGGCCACAUAGUCGCUUGAGUGCAUACUGCGUACUUUAUGUACAAGUCCCGU AAUGGAUCACUCCUCUAUCAUUUCACUAGGUGUGACACAUGAUAUACUAACGUUCUGAAUUGGCAGUGGGGUAUGAGGCACUGAUUGGUCAUGGGACAGACUUGAGAGGAGUUGUCCUUGCUAAGCCCCGUCCC...
output:
GQREGLLIRSGLSCS NGSLLYHFTRCDT DASYKADEGLMFVLKDTGDYGSDYWQK SRKVLVDRISEPLVVAYLEGTDVDGANIGSKFDGANSSAWT FACST LTNARTSFYALRFKDACKYTCKSLFELFSNRGQFS II VLLRAARISCTFIHCRCSRRGFGPLSPCPPRPLAGVGSMIYNSCYIY TRKLSFS ESDQC QNGIPKKAC PHTRRTLPPSV GI ATSNVCTSFHGAGASGRNVCIRGRDRPL AF NPFQVSRSLQPRS IHPGYLRTGGGFRSILSVTRDG...
result:
ok 50 lines
Test #3:
score: 0
Accepted
time: 1ms
memory: 3364kb
input:
50 GGUCAGAGGGAGGGCCUAUUGAUACGUAGUGGACUAUCAUGUUCGUGAGCAGCAUGCAGAUUACCCGUUCGGCGAGGGAGAGCCCGCUCCGAAAUGUUUAGGGAGAUAGCGGGCCACAUAGUCGCUUGAGUGCAUACUGCGUACUUUAUGUACAAGUCCCGU AAUGGAUCACUCCUCUAUCAUUUCACUAGGUGUGACACAUGAUAUACUAACGUUCUGAAUUGGCAGUGGGGUAUGAGGCACUGAUUGGUCAUGGGACAGACUUGAGAGGAGUUGUCCUUGCUAAGCCCCGUCCC...
output:
GQREGLLIRSGLSCS NGSLLYHFTRCDT DASYKADEGLMFVLKDTGDYGSDYWQK SRKVLVDRISEPLVVAYLEGTDVDGANIGSKFDGANSSAWT FACST LTNARTSFYALRFKDACKYTCKSLFELFSNRGQFS II VLLRAARISCTFIHCRCSRRGFGPLSPCPPRPLAGVGSMIYNSCYIY TRKLSFS ESDQC QNGIPKKAC PHTRRTLPPSV GI ATSNVCTSFHGAGASGRNVCIRGRDRPL AF NPFQVSRSLQPRS IHPGYLRTGGGFRSILSVTRDG...
result:
ok 50 lines