QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#520645 | #5660. Simplified Genome Translation | ouo# | AC ✓ | 1ms | 3628kb | C++14 | 1.9kb | 2024-08-15 14:31:23 | 2024-08-15 14:31:23 |
Judging History
answer
#include <bits/stdc++.h>
#ifdef LOCAL
using std::cerr;
#else
#endif
#define F first
#define S second
#define pb push_back
#define ALL(x) begin(x), end(x)
using namespace std;
using pii = pair<int, int>;
map<string, char> mp = {
{"UUU", 'F'},
{"UUC", 'F'},
{"UUA", 'L'},
{"UUG", 'L'},
{"CUU", 'L'},
{"CUC", 'L'},
{"CUA", 'L'},
{"CUG", 'L'},
{"AUU", 'I'},
{"AUC", 'I'},
{"AUA", 'I'},
{"AUG", 'M'},
{"GUU", 'V'},
{"GUC", 'V'},
{"GUA", 'V'},
{"GUG", 'V'},
{"UCU", 'S'},
{"UCC", 'S'},
{"UCA", 'S'},
{"UCG", 'S'},
{"AGU", 'S'},
{"AGC", 'S'},
{"CCU", 'P'},
{"CCC", 'P'},
{"CCA", 'P'},
{"CCG", 'P'},
{"ACU", 'T'},
{"ACC", 'T'},
{"ACA", 'T'},
{"ACG", 'T'},
{"GCU", 'A'},
{"GCC", 'A'},
{"GCA", 'A'},
{"GCG", 'A'},
{"UAU", 'Y'},
{"UAC", 'Y'},
{"CAU", 'H'},
{"CAC", 'H'},
{"CAA", 'Q'},
{"CAG", 'Q'},
{"AAU", 'N'},
{"AAC", 'N'},
{"AAA", 'K'},
{"AAG", 'K'},
{"GAU", 'D'},
{"GAC", 'D'},
{"GAA", 'E'},
{"GAG", 'E'},
{"UGU", 'C'},
{"UGC", 'C'},
{"UGG", 'W'},
{"CGU", 'R'},
{"CGC", 'R'},
{"CGA", 'R'},
{"CGG", 'R'},
{"AGA", 'R'},
{"AGG", 'R'},
{"GGU", 'G'},
{"GGC", 'G'},
{"GGA", 'G'},
{"GGG", 'G'},
{"TOP", 'S'},
{"UAA", 'S'},
{"UAG", 'S'},
{"UGA", 'S'},
};
void sol(string ) {
}
signed main() {
ios::sync_with_stdio(0), cin.tie(0);
int tc = 1;
cin >> tc;
while (tc--) {
string line;
cin >> line;
for (int i=0; i<line.size(); i+=3) {
string c = line.substr(i, 3);
if (c=="UAA"||c=="UAG"||c=="UGA") {
break;
} else cout << mp[c];
} cout << endl;
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3628kb
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: 3516kb
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: 3560kb
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