QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#717027#5660. Simplified Genome Translationtsogsummit#AC ✓1ms3844kbC++231.4kb2024-11-06 16:40:502024-11-06 16:40:51

Judging History

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

  • [2024-11-06 16:40:51]
  • 评测
  • 测评结果:AC
  • 用时:1ms
  • 内存:3844kb
  • [2024-11-06 16:40:50]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;

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

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

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

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

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