QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#650129 | #5660. Simplified Genome Translation | XfJbUhpyzgaW# | AC ✓ | 1ms | 3620kb | C++14 | 1.6kb | 2024-10-18 13:13:54 | 2024-10-18 13:13:54 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
map<string,char> t;
string s;
int T;
int main(){
// freopen("a.in","r",stdin);
cin>>T;
t["UUU"]='F';
t["UUC"]='F';
t["UUA"]='L';
t["UUG"]='L';
t["CUU"]='L';
t["CUC"]='L';
t["CUA"]='L';
t["CUG"]='L';
t["AUU"]='I';
t["AUC"]='I';
t["AUA"]='I';
t["AUG"]='M';
t["GUU"]='V';
t["GUC"]='V';
t["GUA"]='V';
t["GUG"]='V';
t["UCU"]='S';
t["UCC"]='S';
t["UCA"]='S';
t["UCG"]='S';
t["AGU"]='S';
t["AGC"]='S';
t["CCU"]='P';
t["CCC"]='P';
t["CCA"]='P';
t["CCG"]='P';
t["ACU"]='T';
t["ACC"]='T';
t["ACA"]='T';
t["ACG"]='T';
t["GCU"]='A';
t["GCC"]='A';
t["GCA"]='A';
t["GCG"]='A';
t["UAU"]='Y';
t["UAC"]='Y';
t["CAU"]='H';
t["CAC"]='H';
t["CAA"]='Q';
t["CAG"]='Q';
t["AAU"]='N';
t["AAC"]='N';
t["AAA"]='K';
t["AAG"]='K';
t["GAU"]='D';
t["GAC"]='D';
t["GAA"]='E';
t["GAG"]='E';
t["UGU"]='C';
t["UGC"]='C';
t["UGG"]='W';
t["CGU"]='R';
t["CGC"]='R';
t["CGA"]='R';
t["CGG"]='R';
t["AGA"]='R';
t["AGG"]='R';
t["GGU"]='G';
t["GGC"]='G';
t["GGA"]='G';
t["GGG"]='G';
t["UAA"]='\n';
t["UAG"]='\n';
t["UGA"]='\n';
while (T--){
cin>>s;
for (int i=0;i<s.length();i+=3){
char c=t[s.substr(i,3)];
if (c=='\n') break;
putchar(c);
}
puts("");
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3536kb
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: 3620kb
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: 3564kb
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