QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#677510 | #5660. Simplified Genome Translation | Forever_Young# | AC ✓ | 1ms | 3708kb | C++23 | 1.5kb | 2024-10-26 12:25:21 | 2024-10-26 12:25:22 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=1;i<=n;i++)
#define pb push_back
#define mp make_pair
#define data dataa
using LL=long long;
using ULL=unsigned long long;
using LD=long double;
#define gcd(x,y) __gcd(unsigned(x),unsigned(y))
map<string,char>dic;
int main()
{
dic["UUU"]=dic["UUC"]='F';
dic["UUA"]=dic["UUG"]=dic["CUU"]=dic["CUC"]=dic["CUA"]=dic["CUG"]='L';
dic["AUU"]=dic["AUC"]=dic["AUA"]='I';
dic["AUG"]='M';
dic["GUU"]=dic["GUC"]=dic["GUA"]=dic["GUG"]='V';
dic["UCU"]=dic["UCC"]=dic["UCA"]=dic["UCG"]=dic["AGU"]=dic["AGC"]='S';
dic["CCU"]=dic["CCC"]=dic["CCA"]=dic["CCG"]='P';
dic["ACU"]=dic["ACC"]=dic["ACA"]=dic["ACG"]='T';
dic["GCU"]=dic["GCC"]=dic["GCA"]=dic["GCG"]='A';
dic["UAU"]=dic["UAC"]='Y';
dic["CAU"]=dic["CAC"]='H';
dic["CAA"]=dic["CAG"]='Q';
dic["AAU"]=dic["AAC"]='N';
dic["AAA"]=dic["AAG"]='K';
dic["GAU"]=dic["GAC"]='D';
dic["GAA"]=dic["GAG"]='E';
dic["UGU"]=dic["UGC"]='C';
dic["UGG"]='W';
dic["CGU"]=dic["CGC"]=dic["CGA"]=dic["CGG"]=dic["AGA"]=dic["AGG"]='R';
dic["GGU"]=dic["GGC"]=dic["GGA"]=dic["GGG"]='G';
dic["UAA"]=dic["UAG"]=dic["UGA"]='#';
int T;
for(scanf("%d",&T);T--;)
{
char s[1010];
scanf("%s",s+1);
int n=strlen(s+1);
for(int i=1;i<=n;i+=3)
{
string a="";
rep(j,3)a+=s[i+j-1];
if(dic[a]=='#')break;
putchar(dic[a]);
}
puts("");
}
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3608kb
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: 3652kb
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: 3708kb
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