QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#186042#5660. Simplified Genome Translationaesthetic#WA 0ms3532kbC++202.2kb2023-09-23 01:42:342023-09-23 01:42:34

Judging History

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

  • [2023-09-23 01:42:34]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3532kb
  • [2023-09-23 01:42:34]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
#define ll long long
// #define int ll
#define ff first
#define ss second
#define pb push_back
#define eb emplace_back
#define mkp make_pair
typedef pair<int, int> pii;
const ll inf=LLONG_MAX;
const int maxn=1e6+10;

map<string, char> mp;

int32_t main()
{
    #ifndef ONLINE_JUDGE
    freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout); 
    #endif
    ios::sync_with_stdio(0);cin.tie(0);

    mp["UUU"]='F';
    mp["UUC"]='F';
    mp["UUA"]='L';
    mp["UUG"]='L';
    mp["CUU"]='L';
    mp["CUC"]='L';
    mp["CUA"]='L';
    mp["CUG"]='L';
    mp["AUU"]='I';
    mp["AUC"]='I';
    mp["AUA"]='I';
    mp["AUG"]='M';
    mp["GUU"]='V';
    mp["GUC"]='V';
    mp["GUA"]='V';
    mp["GUG"]='V';
    mp["UCU"]='S';
    mp["UCC"]='S';
    mp["UCA"]='S';
    mp["UCG"]='S';
    mp["AGU"]='S';
    mp["AGC"]='S';
    mp["CCU"]='P';
    mp["CCC"]='P';
    mp["CCA"]='P';
    mp["CCG"]='P';
    mp["ACU"]='T';
    mp["ACC"]='T';
    mp["ACA"]='T';
    mp["ACG"]='T';
    mp["GCU"]='A';
    mp["GCC"]='A';
    mp["GCA"]='A';
    mp["GCG"]='A';
    mp["UAU"]='Y';
    mp["UAC"]='Y';
    mp["CAU"]='H';
    mp["CAC"]='H';
    mp["CAA"]='Q';
    mp["CAG"]='Q';
    mp["AAU"]='N';
    mp["AAC"]='N';
    mp["AAA"]='K';
    mp["AAG"]='K';
    mp["GAU"]='D';
    mp["GAC"]='D';
    mp["GAA"]='E';
    mp["GAG"]='E';
    mp["UGU"]='C';
    mp["UGC"]='C';
    mp["UGG"]='W';
    mp["GCU"]='R';
    mp["GCG"]='R';
    mp["CGA"]='R';
    mp["CGG"]='R';
    mp["AGA"]='R';
    mp["AGG"]='R';
    mp["GGU"]='G';
    mp["GGC"]='G';
    mp["GGA"]='G';
    mp["GGG"]='G';
    mp["UAA"]='Z';
    mp["UAG"]='Z';
    mp["UGA"]='Z';

    int T; cin>> T;
    while(T--)
    {
        string s; cin>> s;
        // cout<< s<< endl;
        int sz=(int)s.size();
        int n=sz/3;
        assert(3*n==sz);
        string ans="";
        for(int i=0; i<3*n; i+=3)
        {
            string parte="";
            parte+=s[i];
            parte+=s[i+1];
            parte+=s[i+2];
            if(mp[parte]=='Z')
                break;
            ans+=mp[parte];
        }
        cout<< ans<< "\n";
    }
 
    return 0;
}   

详细

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3532kb

input:

5
UUUUAACACUUUAUCACUUAACACCAC
CAAAAUAUGAAAAAU
AUGUACUUUGCGUUUCACUAA
UUGCACUACUAC
UACGUGGGUAUC

output:

F
QNMKN
MYFRFH
LHYY
YVGI

result:

wrong answer 3rd lines differ - expected: 'MYFAFH', found: 'MYFRFH'