QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#113651 | #5660. Simplified Genome Translation | UFRJ# | AC ✓ | 1ms | 3504kb | C++20 | 1.7kb | 2023-06-19 02:18:57 | 2023-06-19 02:19:00 |
Judging History
answer
#include<bits/stdc++.h>
int main() {
using namespace std;
cin.tie(nullptr)->sync_with_stdio(false);
map<string, string> tab;
tab["UUU"] = 'F';
tab["UUC"] = 'F';
tab["UUA"] = 'L';
tab["UUG"] = 'L';
tab["CUU"] = 'L';
tab["CUC"] = 'L';
tab["CUA"] = 'L';
tab["CUG"] = 'L';
tab["AUU"] = 'I';
tab["AUC"] = 'I';
tab["AUA"] = 'I';
tab["AUG"] = 'M';
tab["GUU"] = 'V';
tab["GUC"] = 'V';
tab["GUA"] = 'V';
tab["GUG"] = 'V';
tab["UCU"] = 'S';
tab["UCC"] = 'S';
tab["UCA"] = 'S';
tab["UCG"] = 'S';
tab["AGU"] = 'S';
tab["AGC"] = 'S';
tab["CCU"] = 'P';
tab["CCC"] = 'P';
tab["CCA"] = 'P';
tab["CCG"] = 'P';
tab["ACU"] = 'T';
tab["ACC"] = 'T';
tab["ACA"] = 'T';
tab["ACG"] = 'T';
tab["GCU"] = 'A';
tab["GCC"] = 'A';
tab["GCA"] = 'A';
tab["GCG"] = 'A';
tab["UAU"] = 'Y';
tab["UAC"] = 'Y';
tab["CAU"] = 'H';
tab["CAC"] = 'H';
tab["CAA"] = 'Q';
tab["CAG"] = 'Q';
tab["AAU"] = 'N';
tab["AAC"] = 'N';
tab["AAA"] = 'K';
tab["AAG"] = 'K';
tab["GAU"] = 'D';
tab["GAC"] = 'D';
tab["GAA"] = 'E';
tab["GAG"] = 'E';
tab["UGU"] = 'C';
tab["UGC"] = 'C';
tab["UGG"] = 'W';
tab["CGU"] = 'R';
tab["CGC"] = 'R';
tab["CGA"] = 'R';
tab["CGG"] = 'R';
tab["AGA"] = 'R';
tab["AGG"] = 'R';
tab["GGU"] = 'G';
tab["GGC"] = 'G';
tab["GGA"] = 'G';
tab["GGG"] = 'G';
tab["UAA"] = "STOP";
tab["UAG"] = "STOP";
tab["UGA"] = "STOP";
int T; cin >> T;
while (T--) {
string S; cin >> S;
int N = int(S.size());
for (int a = 0; a < N; a += 3) {
if (tab[S.substr(a, 3)] == "STOP") break;
cout << tab[S.substr(a, 3)];
}
cout << '\n';
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3504kb
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: 3492kb
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: 3476kb
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