QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#102529 | #5660. Simplified Genome Translation | mobbb# | AC ✓ | 4ms | 3568kb | C++14 | 1.7kb | 2023-05-03 14:25:54 | 2023-05-03 14:25:57 |
Judging History
answer
#include"iostream"
#include<algorithm>
#include<cmath>
#include"vector"
#include"string"
using namespace std;
int N,T,a='A',b='B',c='C',d='D',e='E',f='F',g='G',h='H',i='I',j='J',k='K',l='L',m='M',n='N',o='O',p='P',q='Q',r='R',s='S',t='T',u='U',v='V',w='W',x='X',y='Y',z='Z';
string S;
char biao[100][100][100],C;
int main(){
biao[u][u][u]=f;biao[u][u][c]=f;
biao[u][u][a]=l;biao[u][u][g]=l;biao[c][u][u]=l;biao[c][u][c]=l;biao[c][u][a]=l;biao[c][u][g]=l;
biao[a][u][u]=i;biao[a][u][c]=i;biao[a][u][a]=i;
biao[a][u][g]=m;
biao[g][u][u]=v;biao[g][u][c]=v;biao[g][u][a]=v;biao[g][u][g]=v;
biao[u][c][u]=s;biao[u][c][c]=s;biao[u][c][a]=s;biao[u][c][g]=s;biao[a][g][u]=s;biao[a][g][c]=s;
biao[c][c][u]=p;biao[c][c][c]=p;biao[c][c][a]=p;biao[c][c][g]=p;
biao[a][c][u]=t;biao[a][c][c]=t;biao[a][c][a]=t;biao[a][c][g]=t;
biao[g][c][u]=a;biao[g][c][c]=a;biao[g][c][a]=a;biao[g][c][g]=a;
biao[u][a][u]=y;biao[u][a][c]=y;
biao[c][a][u]=h;biao[c][a][c]=h;
biao[c][a][a]=q;biao[c][a][g]=q;
biao[a][a][u]=n;biao[a][a][c]=n;
biao[a][a][a]=k;biao[a][a][g]=k;
biao[g][a][u]=d;biao[g][a][c]=d;
biao[g][a][a]=e; biao[g][a][g]=e;
biao[u][g][u]=c;biao[u][g][c]=c;
biao[u][g][g]=w;
biao[c][g][u]=r;biao[c][g][c]=r;biao[c][g][a]=r;biao[c][g][g]=r;biao[a][g][a]=r;biao[a][g][g]=r;
biao[g][g][u]=g; biao[g][g][c]=g; biao[g][g][a]=g; biao[g][g][g]=g;
cin >> T;
while(T--){
cin >>S;
for(int I=0;I<S.size();I+=3){
int a1=S[I],a2=S[I+1],a3=S[I+2];
if(a1==u&&a2==a&&a3==a) break;
if(a1==u&&a2==a&&a3==g) break;
if(a1==u&&a2==g&&a3==a) break;
C=biao[a1][a2][a3];
cout <<C;
}cout <<'\n';
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 3ms
memory: 3568kb
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: 3420kb
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: 4ms
memory: 3388kb
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