QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#102947#5660. Simplified Genome TranslationwakakakaAC ✓3ms3424kbC++171.4kb2023-05-03 20:28:432023-05-03 20:28:45

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 20:28:45]
  • 评测
  • 测评结果:AC
  • 用时:3ms
  • 内存:3424kb
  • [2023-05-03 20:28:43]
  • 提交

answer

#include <iostream>

using namespace std;

string s;

int main()
{	
	int all;
	cin>>all;
	while(all--)
	{
		cin>>s;
		int len=s.size();
		for(int i=0;i<len;i+=3)
		{
			string t;
			t+=s[i];t+=s[i+1];t+=s[i+2];
			
			if(t=="UUU"||t=="UUC") cout<<"F";
			else if(t=="UUA"||t=="UUG"||t=="CUU"||t=="CUC"||t=="CUA"||t=="CUG") cout<<"L";
			else if(t=="AUU"||t=="AUC"||t=="AUA") cout<<"I";
			else if(t=="AUG") cout<<"M";
			else if(t=="GUU"||t=="GUC"||t=="GUA"||t=="GUG") cout<<"V";
			else if(t=="UCU"||t=="UCC"||t=="UCA"||t=="UCG"||t=="AGU"||t=="AGC") cout<<"S";
			else if(t=="CCU"||t=="CCC"||t=="CCA"||t=="CCG") cout<<"P";
			else if(t=="ACU"||t=="ACC"||t=="ACA"||t=="ACG") cout<<"T";
			else if(t=="GCU"||t=="GCC"||t=="GCA"||t=="GCG") cout<<"A";
			else if(t=="UAU"||t=="UAC") cout<<"Y";
			else if(t=="CAU"||t=="CAC") cout<<"H";
			else if(t=="CAA"||t=="CAG") cout<<"Q";
			else if(t=="AAU"||t=="AAC") cout<<"N";
			else if(t=="AAA"||t=="AAG") cout<<"K";
			else if(t=="GAU"||t=="GAC") cout<<"D";
			else if(t=="GAA"||t=="GAG") cout<<"E";
			else if(t=="UGU"||t=="UGC") cout<<"C";
			else if(t=="UGG") cout<<"W";
			else if(t=="CGU"||t=="CGC"||t=="CGA"||t=="CGG"||t=="AGA"||t=="AGG") cout<<"R";
			else if(t=="GGU"||t=="GGC"||t=="GGA"||t=="GGG") cout<<"G";
			else if(t=="UAA"||t=="UAG"||t=="UGA") break;
		}
		
		cout<<endl;
	}
	
	
	return 0;
}

詳細信息

Test #1:

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

input:

5
UUUUAACACUUUAUCACUUAACACCAC
CAAAAUAUGAAAAAU
AUGUACUUUGCGUUUCACUAA
UUGCACUACUAC
UACGUGGGUAUC

output:

F
QNMKN
MYFAFH
LHYY
YVGI

result:

ok 5 lines

Test #2:

score: 0
Accepted
time: 3ms
memory: 3380kb

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

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