QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#179160 | #5660. Simplified Genome Translation | arseny_y# | AC ✓ | 1ms | 3504kb | C++23 | 1.8kb | 2023-09-14 19:00:42 | 2023-09-14 19:00:42 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
map<string, string> x;
int main() {
x["UUU"] = "F";
x["UUC"] = "F";
x["UUA"] = "L";
x["UUG"] = "L";
x["CUU"] = "L";
x["CUC"] = "L";
x["CUA"] = "L";
x["CUG"] = "L";
x["AUU"] = "I";
x["AUC"] = "I";
x["AUA"] = "I";
x["AUG"] = "M";
x["GUU"] = "V";
x["GUC"] = "V";
x["GUA"] = "V";
x["GUG"] = "V";
x["UCU"] = "S";
x["UCC"] = "S";
x["UCA"] = "S";
x["UCG"] = "S";
x["AGU"] = "S";
x["AGC"] = "S";
x["CCU"] = "P";
x["CCC"] = "P";
x["CCA"] = "P";
x["CCG"] = "P";
x["ACU"] = "T";
x["ACC"] = "T";
x["ACA"] = "T";
x["ACG"] = "T";
x["GCU"] = "A";
x["GCC"] = "A";
x["GCA"] = "A";
x["GCG"] = "A";
x["UAU"] = "Y";
x["UAC"] = "Y";
x["CAU"] = "H";
x["CAC"] = "H";
x["CAA"] = "Q";
x["CAG"] = "Q";
x["AAU"] = "N";
x["AAC"] = "N";
x["AAA"] = "K";
x["AAG"] = "K";
x["GAU"] = "D";
x["GAC"] = "D";
x["GAA"] = "E";
x["GAG"] = "E";
x["UGU"] = "C";
x["UGC"] = "C";
x["UGG"] = "W";
x["CGU"] = "R";
x["CGC"] = "R";
x["CGA"] = "R";
x["CGG"] = "R";
x["AGA"] = "R";
x["AGG"] = "R";
x["GGU"] = "G";
x["GGC"] = "G";
x["GGA"] = "G";
x["GGG"] = "G";
x["UAA"] = "STOP";
x["UAG"] = "STOP";
x["UGA"] = "STOP";
int n;
cin >> n;
while (n--) {
string a;
cin >> a;
string d;
while (!a.empty()) {
auto f = a.substr(0, 3);
a.erase(a.begin(), a.begin() + 3);
if (f == "UAA" || f == "UAG" || f == "UGA") break;
d += x[f];
}
cout << d << '\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: 3432kb
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: 3436kb
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