QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#109289#5660. Simplified Genome Translationchenshi#AC ✓1ms1752kbC++3.8kb2023-05-28 09:38:112023-05-28 09:38:16

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-28 09:38:16]
  • 评测
  • 测评结果:AC
  • 用时:1ms
  • 内存:1752kb
  • [2023-05-28 09:38:11]
  • 提交

answer

#include<cstdio>
#include<cstring>
using namespace std;
int T,n;char s[1010];
int main(){
	for(scanf("%d",&T);T--;putchar('\n')){
		scanf("%s",s);n=strlen(s);
		for(int i=0;i<n;i+=3){
			if(s[i]=='U'&&s[i+1]=='U'&&s[i+2]=='U') putchar('F');
			if(s[i]=='U'&&s[i+1]=='U'&&s[i+2]=='C') putchar('F');
			if(s[i]=='U'&&s[i+1]=='U'&&s[i+2]=='A') putchar('L');
			if(s[i]=='U'&&s[i+1]=='U'&&s[i+2]=='G') putchar('L');
			if(s[i]=='C'&&s[i+1]=='U'&&s[i+2]=='U') putchar('L');
			if(s[i]=='C'&&s[i+1]=='U'&&s[i+2]=='C') putchar('L');
			if(s[i]=='C'&&s[i+1]=='U'&&s[i+2]=='A') putchar('L');
			if(s[i]=='C'&&s[i+1]=='U'&&s[i+2]=='G') putchar('L');
			if(s[i]=='A'&&s[i+1]=='U'&&s[i+2]=='U') putchar('I');
			if(s[i]=='A'&&s[i+1]=='U'&&s[i+2]=='C') putchar('I');
			if(s[i]=='A'&&s[i+1]=='U'&&s[i+2]=='A') putchar('I');
			if(s[i]=='A'&&s[i+1]=='U'&&s[i+2]=='G') putchar('M');
			if(s[i]=='G'&&s[i+1]=='U'&&s[i+2]=='U') putchar('V');
			if(s[i]=='G'&&s[i+1]=='U'&&s[i+2]=='C') putchar('V');
			if(s[i]=='G'&&s[i+1]=='U'&&s[i+2]=='A') putchar('V');
			if(s[i]=='G'&&s[i+1]=='U'&&s[i+2]=='G') putchar('V');
			if(s[i]=='U'&&s[i+1]=='C'&&s[i+2]=='U') putchar('S');
			if(s[i]=='U'&&s[i+1]=='C'&&s[i+2]=='C') putchar('S');
			if(s[i]=='U'&&s[i+1]=='C'&&s[i+2]=='A') putchar('S');
			if(s[i]=='U'&&s[i+1]=='C'&&s[i+2]=='G') putchar('S');
			if(s[i]=='A'&&s[i+1]=='G'&&s[i+2]=='U') putchar('S');
			if(s[i]=='A'&&s[i+1]=='G'&&s[i+2]=='C') putchar('S');
			if(s[i]=='C'&&s[i+1]=='C'&&s[i+2]=='U') putchar('P');
			if(s[i]=='C'&&s[i+1]=='C'&&s[i+2]=='C') putchar('P');
			if(s[i]=='C'&&s[i+1]=='C'&&s[i+2]=='A') putchar('P');
			if(s[i]=='C'&&s[i+1]=='C'&&s[i+2]=='G') putchar('P');
			if(s[i]=='A'&&s[i+1]=='C'&&s[i+2]=='U') putchar('T');
			if(s[i]=='A'&&s[i+1]=='C'&&s[i+2]=='C') putchar('T');
			if(s[i]=='A'&&s[i+1]=='C'&&s[i+2]=='A') putchar('T');
			if(s[i]=='A'&&s[i+1]=='C'&&s[i+2]=='G') putchar('T');
			if(s[i]=='G'&&s[i+1]=='C'&&s[i+2]=='U') putchar('A');
			if(s[i]=='G'&&s[i+1]=='C'&&s[i+2]=='C') putchar('A');
			if(s[i]=='G'&&s[i+1]=='C'&&s[i+2]=='A') putchar('A');
			if(s[i]=='G'&&s[i+1]=='C'&&s[i+2]=='G') putchar('A');
			if(s[i]=='U'&&s[i+1]=='A'&&s[i+2]=='U') putchar('Y');
			if(s[i]=='U'&&s[i+1]=='A'&&s[i+2]=='C') putchar('Y');
			if(s[i]=='C'&&s[i+1]=='A'&&s[i+2]=='U') putchar('H');
			if(s[i]=='C'&&s[i+1]=='A'&&s[i+2]=='C') putchar('H');
			if(s[i]=='C'&&s[i+1]=='A'&&s[i+2]=='A') putchar('Q');
			if(s[i]=='C'&&s[i+1]=='A'&&s[i+2]=='G') putchar('Q');
			if(s[i]=='A'&&s[i+1]=='A'&&s[i+2]=='U') putchar('N');
			if(s[i]=='A'&&s[i+1]=='A'&&s[i+2]=='C') putchar('N');
			if(s[i]=='A'&&s[i+1]=='A'&&s[i+2]=='A') putchar('K');
			if(s[i]=='A'&&s[i+1]=='A'&&s[i+2]=='G') putchar('K');
			if(s[i]=='G'&&s[i+1]=='A'&&s[i+2]=='U') putchar('D');
			if(s[i]=='G'&&s[i+1]=='A'&&s[i+2]=='C') putchar('D');
			if(s[i]=='G'&&s[i+1]=='A'&&s[i+2]=='A') putchar('E');
			if(s[i]=='G'&&s[i+1]=='A'&&s[i+2]=='G') putchar('E');
			if(s[i]=='U'&&s[i+1]=='G'&&s[i+2]=='U') putchar('C');
			if(s[i]=='U'&&s[i+1]=='G'&&s[i+2]=='C') putchar('C');
			if(s[i]=='U'&&s[i+1]=='G'&&s[i+2]=='G') putchar('W');
			if(s[i]=='C'&&s[i+1]=='G'&&s[i+2]=='U') putchar('R');
			if(s[i]=='C'&&s[i+1]=='G'&&s[i+2]=='C') putchar('R');
			if(s[i]=='C'&&s[i+1]=='G'&&s[i+2]=='A') putchar('R');
			if(s[i]=='C'&&s[i+1]=='G'&&s[i+2]=='G') putchar('R');
			if(s[i]=='A'&&s[i+1]=='G'&&s[i+2]=='A') putchar('R');
			if(s[i]=='A'&&s[i+1]=='G'&&s[i+2]=='G') putchar('R');
			if(s[i]=='G'&&s[i+1]=='G'&&s[i+2]=='U') putchar('G');
			if(s[i]=='G'&&s[i+1]=='G'&&s[i+2]=='C') putchar('G');
			if(s[i]=='G'&&s[i+1]=='G'&&s[i+2]=='A') putchar('G');
			if(s[i]=='G'&&s[i+1]=='G'&&s[i+2]=='G') putchar('G');
			if(s[i]=='U'&&s[i+1]=='A'&&s[i+2]=='A') break;
			if(s[i]=='U'&&s[i+1]=='A'&&s[i+2]=='G') break;
			if(s[i]=='U'&&s[i+1]=='G'&&s[i+2]=='A') break;
		}
	}
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 1540kb

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: 1752kb

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: 1740kb

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