QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#221388#7070. IsomerismQuanQiuTongWA 0ms3636kbC++141.3kb2023-10-21 13:06:032023-10-21 13:06:03

Judging History

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

  • [2023-10-21 13:06:03]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3636kb
  • [2023-10-21 13:06:03]
  • 提交

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;
    string r[5];
    for (int T = read(); T--;)
    {
        s.clear();
        fo(j, 4) cin >> r[j], s.insert(r[j]);
        if (s.size() == 1)
            puts("None");
        else if (s.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 (s.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: 0ms
memory: 3636kb

input:

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

output:

Zasamman
Zasamman

result:

wrong answer 1st lines differ - expected: 'None', found: 'Zasamman'