QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#103847 | #5660. Simplified Genome Translation | Robert_JYH# | AC ✓ | 2ms | 3416kb | C++17 | 1.8kb | 2023-05-07 18:18:49 | 2023-05-07 18:18:53 |
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;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 2ms
memory: 3416kb
input:
5 UUUUAACACUUUAUCACUUAACACCAC CAAAAUAUGAAAAAU AUGUACUUUGCGUUUCACUAA UUGCACUACUAC UACGUGGGUAUC
output:
F QNMKN MYFAFH LHYY YVGI
result:
ok 5 lines
Test #2:
score: 0
Accepted
time: 1ms
memory: 3384kb
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: 2ms
memory: 3324kb
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