QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#221391#7070. IsomerismQuanQiuTongWA 1ms3464kbC++141.4kb2023-10-21 13:07:562023-10-21 13:07:57

Judging History

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

  • [2023-10-21 13:07:57]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3464kb
  • [2023-10-21 13:07:56]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
#define read() ({int x,c,f=1;while((c=getchar())<48||57<c)if(c=='-')f=-1;for(x=c^48;47<(c=getchar())&&c<58;)x=x*10+(c^48);x*f; })
#define fo(i, n) for (int i = 1, _##i(n); i <= _##i; ++i)
const int N = 2e5 + 2;
map<string, int> m{{"-F", 0}, {"-Cl", 1}, {"-Br", 2}, {"-I", 3}, {"-CH3", 4}, {"-CH2CH3", 5}, {"-CH2CH2CH3", 6}, {"-H", 7}};
int main()
{
    multiset<string> s;
    set<string> ss;
    string r[5];
    for (int T = read(); T--;)
    {
        s.clear();
        fo(j, 4) cin >> r[j], s.insert(r[j]), ss.insert(r[j]);
        if (ss.size() == 1)
            puts("None");
        else if (ss.size() == 2)
        {
            int cnt = s.count(*s.begin());
            if (cnt == 3 || cnt == 1)
                puts("None");
            else if (r[1] == r[2] || r[3] == r[4])
                puts("Cis");
            else if (r[1] == r[4] || r[2] == r[3])
                puts("Trans");
            else
                puts("None");
        }
        else if (ss.size() == 3)
        {
            if (r[1] == r[2] || r[3] == r[4])
                puts("Cis");
            else if (r[1] == r[4] || r[2] == r[3])
                puts("Trans");
            else
                puts("None");
        }
        else
            puts((m[r[1]] < m[r[3]]) ^ (m[r[2]] < m[r[4]]) ? "Entgegen" : "Zasamman");
    }
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 1ms
memory: 3464kb

input:

2
-H -H -H -Cl
-F -F -Br -Cl

output:

None
Zasamman

result:

wrong answer 2nd lines differ - expected: 'Cis', found: 'Zasamman'