QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#152591#5660. Simplified Genome Translationftt_fan_club#AC ✓2ms3476kbC++141.3kb2023-08-28 13:17:442023-08-28 13:17:45

Judging History

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

  • [2023-08-28 13:17:45]
  • 评测
  • 测评结果:AC
  • 用时:2ms
  • 内存:3476kb
  • [2023-08-28 13:17:44]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
int T,u;string s;
void prt(int x,int y,int z){
	string h="";
	h.push_back(s[x]);
	h.push_back(s[y]);
	h.push_back(s[z]);
	if(h=="UUU"||h=="UUC"){
		cout<<"F";
	}else if(h=="UUA"||h=="UUG"||h=="CUU"
	||h=="CUC"||h=="CUA"||h=="CUG"){
		cout<<"L";
	}else if(h=="AUU"||h=="AUC"||h=="AUA"){
		cout<<"I";
	}else if(h=="AUG"){
		cout<<"M";
	}else if(h=="GUU"||h=="GUC"||h=="GUA"
	||h=="GUG")cout<<"V";
	else if(h=="UCU"||h=="UCC"||h=="UCA"
	||h=="UCG"||h=="AGU"||h=="AGC"){
		cout<<"S";
	}else if(h=="CCU"||h=="CCC"||h=="CCA"||
	h=="CCG")cout<<"P";
	else if(h[0]=='A'&&h[1]=='C')cout<<"T";
	else if(h[0]=='G'&&h[1]=='C')cout<<"A";
	else if(h=="UAU"||h=="UAC")cout<<"Y";
	else if(h=="CAU"||h=="CAC")cout<<"H";
	else if(h=="CAA"||h=="CAG")cout<<"Q";
	else if(h=="AAU"||h=="AAC")cout<<"N";
	else if(h=="AAA"||h=="AAG")cout<<"K";
	else if(h=="GAU"||h=="GAC")cout<<"D";
	else if(h=="GAA"||h=="GAG")cout<<"E";
	else if(h=="UGU"||h=="UGC")cout<<"C";
	else if(h=="UGG")cout<<"W";
	else if((h[0]=='C'&&h[1]=='G')||
	h=="AGA"||h=="AGG")cout<<"R";
	else if(h[0]=='G'&&h[1]=='G')cout<<"G";
	else u=0;
	return;	
}signed main(){
	ios::sync_with_stdio(0);
	cin.tie(0);cin>>T;
	while(T--){
		cin>>s;
		u=s.length();
		for(int i=1;i<=u/3;i++)
			prt(3*i-3,3*i-2,3*i-1);
		cout<<"\n";
	}
	return 0;
}

詳細信息

Test #1:

score: 100
Accepted
time: 0ms
memory: 3476kb

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

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