QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#102418#5660. Simplified Genome Translationir101#AC ✓2ms3552kbC++171.8kb2023-05-03 12:57:582023-05-03 12:58:03

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-05-03 12:58:03]
  • 评测
  • 测评结果:AC
  • 用时:2ms
  • 内存:3552kb
  • [2023-05-03 12:57:58]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define endl '\n'
#define inf 0x3f3f3f3f
const int N=1e5+10;
map<string,char> mp;
int main(){
    ios::sync_with_stdio(0);cin.tie(0),cout.tie(0);
    int t;cin>>t;
    mp["UUU"]='F';
    mp["UUC"]='F';
    mp["UUA"]='L';
    mp["UUG"]='L';
    mp["CUU"]='L';
    mp["CUC"]='L';
    mp["CUA"]='L';
    mp["CUG"]='L';
    mp["AUU"]='I';
    mp["AUC"]='I';
    mp["AUA"]='I';
    mp["AUG"]='M';
    mp["AUU"]='I';
    mp["AUC"]='I';
    mp["AUA"]='I';
    mp["AUG"]='M';
    mp["GUU"]='V';
    mp["GUC"]='V';
    mp["GUA"]='V';
    mp["GUG"]='V';
    mp["UCU"]='S';
    mp["UCC"]='S';
    mp["UCA"]='S';
    mp["UCG"]='S';
    mp["AGU"]='S';
    mp["AGC"]='S';
    mp["CCU"]='P';
    mp["CCC"]='P';
    mp["CCA"]='P';
    mp["CCG"]='P';
    mp["ACU"]='T';
    mp["ACC"]='T';
    mp["ACA"]='T';
    mp["ACG"]='T';
    mp["GCU"]='A';
    mp["GCC"]='A';
    mp["GCA"]='A';
    mp["GCG"]='A';
    mp["UAU"]='Y';
    mp["UAC"]='Y';
    mp["CAU"]='H';
    mp["CAC"]='H';
    mp["CAA"]='Q';
    mp["CAG"]='Q';
    mp["AAU"]='N';
    mp["AAC"]='N';
    mp["AAA"]='K';
    mp["AAG"]='K';
    mp["GAU"]='D';
    mp["GAC"]='D';
    mp["GAA"]='E';
    mp["GAG"]='E';
    mp["UGU"]='C';
    mp["UGC"]='C';
    mp["UGG"]='W';
    mp["CGU"]='R';
    mp["CGC"]='R';
    mp["CGA"]='R';
    mp["CGG"]='R';
    mp["AGA"]='R';
    mp["AGG"]='R';
    mp["GGU"]='G';
    mp["GGC"]='G';
    mp["GGA"]='G';
    mp["GGG"]='G';
    mp["UAA"]='B';
    mp["UAG"]='B';
    mp["UGA"]='B';

    while(t--){
        string s;cin>>s;
        string ans="";
        while(s.size()){
            string tt=s.substr(0,3);
            if(mp[tt]=='B')break;
            ans+=mp[tt];
            s=s.substr(3);
        }
        cout<<ans<<endl;
    }
    return 0;
}

詳細信息

Test #1:

score: 100
Accepted
time: 2ms
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: 3512kb

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: 2ms
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