QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#102425 | #5660. Simplified Genome Translation | WPS# | AC ✓ | 2ms | 3456kb | C++17 | 2.0kb | 2023-05-03 13:01:33 | 2023-05-03 13:01:35 |
Judging History
answer
#include <bits/stdc++.h>
#define int long long
#define endl '\n'
using namespace std;
const int maxn = 3e5+10;
const int mod = 1e9+7;
const int INF = 0x3f3f3f3f3f3f3f3f;
map<string,char>mp;
void solve(){
string s , t;
cin >> s;
for( int i = 0 ; i < s.size() ; i += 3 ){
t = s.substr( i , 3 );
if( mp[t] == '*' ){
cout << "\n";
return;
}
cout << mp[t];
}
cout <<"\n";
}
void f(){
mp["UUU"] = 'F';
mp["UUA"] = 'L';
mp["AUU"] = 'I';
mp["AUG"] = 'M';
mp["GUU"] = 'V';
mp["UCU"] = 'S';
mp["CCU"] = 'P';
mp["ACU"] = 'T';
mp["GCU"] = 'A';
mp["UAU"] = 'Y';
mp["CAU"] = 'H';
mp["CAA"] = 'Q';
mp["AAU"] = 'N';
mp["AAA"] = 'K';
mp["GAU"] = 'D';
mp["GAA"] = 'E';
mp["UGU"] = 'C';
mp["UGG"] = 'W';
mp["CGU"] = 'R';
mp["GGU"] = 'G';
mp["UUC"] = 'F';
mp["UUG"] = 'L';
mp["AUC"] = 'I';
mp["GUC"] = 'V';
mp["UCC"] = 'S';
mp["CCC"] = 'P';
mp["ACC"] = 'T';
mp["GCC"] = 'A';
mp["UAC"] = 'Y';
mp["CAC"] = 'H';
mp["CAG"] = 'Q';
mp["AAC"] = 'N';
mp["AAG"] = 'K';
mp["GAC"] = 'D';
mp["GAG"] = 'E';
mp["UGC"] = 'C';
mp["CGC"] = 'R';
mp["GGC"] = 'G';
mp["CUU"] = 'L';
mp["AUA"] = 'I';
mp["GUA"] = 'V';
mp["UCA"] = 'S';
mp["CCA"] = 'P';
mp["ACA"] = 'T';
mp["GCA"] = 'A';
mp["CGA"] = 'R';
mp["GGA"] = 'G';
mp["CUC"] = 'L';
mp["GUG"] = 'V';
mp["UCG"] = 'S';
mp["CCG"] = 'P';
mp["ACG"] = 'T';
mp["GCG"] = 'A';
mp["CGG"] = 'R';
mp["GGG"] = 'G';
mp["UAA"] = '*';
mp["UAG"] = '*';
mp["UGA"] = '*';
mp["CUG"] = 'L';
mp["AGC"] = 'S';
mp["AGG"] = 'R';
mp["CUA"] = 'L';
mp["AGU"] = 'S';
mp["AGA"] = 'R';
}
int32_t main(){
ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
f();
int T=1;
cin>>T;
while(T--){
solve();
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3428kb
input:
5 UUUUAACACUUUAUCACUUAACACCAC CAAAAUAUGAAAAAU AUGUACUUUGCGUUUCACUAA UUGCACUACUAC UACGUGGGUAUC
output:
F QNMKN MYFAFH LHYY YVGI
result:
ok 5 lines
Test #2:
score: 0
Accepted
time: 2ms
memory: 3456kb
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: 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