QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#221388 | #7070. Isomerism | QuanQiuTong | WA | 0ms | 3636kb | C++14 | 1.3kb | 2023-10-21 13:06:03 | 2023-10-21 13:06:03 |
Judging History
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;
}
详细
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'