QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#204180 | #5660. Simplified Genome Translation | Alfeh | AC ✓ | 1ms | 3552kb | C++14 | 1.5kb | 2023-10-07 05:04:10 | 2023-10-07 05:04:12 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
const int sz = 1e5 + 5, mod = 1e9 + 7;
int32_t main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
map<string,string>mp;
mp["GCU"]="A";
mp["GCC"]="A";
mp["GCA"]="A";
mp["GCG"]="A";
mp["UGU"]="C";
mp["UGC"]="C";
mp["GAU"]="D";
mp["GAC"]="D";
mp["GAA"]="E";
mp["GAG"]="E";
mp["UUU"]="F";
mp["UUC"]="F";
mp["GGU"]="G";
mp["GGC"]="G";
mp["GGA"]="G";
mp["GGG"]="G";
mp["CAU"]="H";
mp["CAC"]="H";
mp["AUU"]="I";
mp["AUC"]="I";
mp["AUA"]="I";
mp["AAA"]="K";
mp["AAG"]="K";
mp["UUA"]="L";
mp["UUG"]="L";
mp["CUU"]="L";
mp["CUC"]="L";
mp["CUA"]="L";
mp["CUG"]="L";
mp["AUG"]="M";
mp["AAU"]="N";
mp["AAC"]="N";
mp["CCU"]="P";
mp["CCC"]="P";
mp["CCA"]="P";
mp["CCG"]="P";
mp["CAA"]="Q";
mp["CAG"]="Q";
mp["CGU"]="R";
mp["CGC"]="R";
mp["CGA"]="R";
mp["CGG"]="R";
mp["AGA"]="R";
mp["AGG"]="R";
mp["UCU"]="S";
mp["UCC"]="S";
mp["UCA"]="S";
mp["UCG"]="S";
mp["AGU"]="S";
mp["AGC"]="S";
mp["UAA"]="STOP";
mp["UAG"]="STOP";
mp["UGA"]="STOP";
mp["ACU"]="T";
mp["ACC"]="T";
mp["ACA"]="T";
mp["ACG"]="T";
mp["GUU"]="V";
mp["GUC"]="V";
mp["GUA"]="V";
mp["GUG"]="V";
mp["UGG"]="W";
mp["UAU"]="Y";
mp["UAC"]="Y";
int t; cin >> t;
while(t--) {
string s; cin >> s;
string ans = "";
int n = s.size();
for(int i = 0; i + 3 <= n; i += 3) {
string cr = s.substr(i, 3);
if(mp[cr] == "STOP") break;
ans += mp[cr];
}
cout << ans << "\n";
}
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 1ms
memory: 3448kb
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: 3552kb
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: 0ms
memory: 3464kb
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