QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#168294#7070. Isomerismsupepapupu#AC ✓16ms3672kbC++17994b2023-09-08 08:03:492023-09-08 08:03:50

Judging History

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

  • [2023-09-08 08:03:50]
  • 评测
  • 测评结果:AC
  • 用时:16ms
  • 内存:3672kb
  • [2023-09-08 08:03:49]
  • 提交

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();
}

这程序好像有点Bug,我给组数据试试?

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3560kb

input:

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

output:

None
Cis

result:

ok 2 lines

Test #2:

score: 0
Accepted
time: 16ms
memory: 3672kb

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:

ok 100000 lines