QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#168293 | #7070. Isomerism | supepapupu# | WA | 26ms | 3436kb | C++17 | 996b | 2023-09-08 07:57:17 | 2023-09-08 07:57:18 |
Judging History
answer
#include <bits/stdc++.h>
#define x first
#define y second
#define el '\n'
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
const int N = 3e5 + 10, INF = 0x3f3f3f3f, mod = 998244353;
map<string, int> mp;
void solve() {
string R[5];
for (int i = 1; i <= 4; ++i) {
cin >> R[i];
}
if (R[1] == R[3] || R[2] == R[4]) {
cout << "None\n"; return;
}
if (R[1] == R[2] || R[3] == R[4]) {
cout << "Cis\n"; return;
}
if (R[1] == R[4] || R[3] == R[2]) {
cout << "Trans\n"; return;
}
if ((mp[R[1]] > mp[R[3]]) == (mp[R[2]] > mp[R[4]])) {
cout << "Zasamman\n"; return;
}
cout << "Entgegen\n";
}
int main() {
ios::sync_with_stdio(0); cin.tie(0);
mp["-F"] = 8, mp["-Cl"] = 7, mp["-Br"] = '6', mp["-I"] = 5,
mp["-CH3"] = 4, mp["-CH2CH3"] = 3, mp["-CH2CH2CH3"] = 2, mp["-H"] = 1;
int tcase = 1;
cin >> tcase;
while (tcase--) solve();
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3432kb
input:
2 -H -H -H -Cl -F -F -Br -Cl
output:
None Cis
result:
ok 2 lines
Test #2:
score: -100
Wrong Answer
time: 26ms
memory: 3436kb
input:
100000 -Br -CH3 -H -CH2CH2CH3 -CH3 -I -Cl -Cl -CH3 -Br -CH2CH3 -CH3 -H -CH3 -Cl -CH3 -H -F -CH2CH3 -CH2CH2CH3 -Br -Br -Cl -CH2CH2CH3 -F -Cl -H -CH2CH2CH3 -CH2CH2CH3 -CH3 -CH3 -H -CH2CH2CH3 -CH3 -CH2CH2CH3 -Br -CH3 -Cl -CH2CH2CH3 -CH3 -H -CH2CH3 -I -I -CH3 -Cl -Br -I -I -Cl -H -F -CH2CH2CH3 -Cl -Br -...
output:
Zasamman Cis Trans None Entgegen Cis Zasamman Trans None Trans Cis Entgegen Entgegen Cis Cis Entgegen Trans None Cis None Cis None None Zasamman Cis None Entgegen Entgegen None None Cis Trans Zasamman Entgegen Zasamman Trans Entgegen None Zasamman Trans Cis Trans Zasamman Trans None Zasamman None Tr...
result:
wrong answer 51st lines differ - expected: 'Zasamman', found: 'Entgegen'