QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#732015#7070. IsomerismYurily#WA 72ms3944kbC++201.2kb2024-11-10 12:44:142024-11-10 12:44:14

Judging History

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

  • [2024-11-10 12:44:14]
  • 评测
  • 测评结果:WA
  • 用时:72ms
  • 内存:3944kb
  • [2024-11-10 12:44:14]
  • 提交

answer

#include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<string>
#include<map>
using namespace std;

const int N = 4;
const int M = 8;

    string ba[M + 3] = {"-F", "-Cl", "-Br", "-I", "-CH3", "-CH2CH3", "-CH2CH2CH3", "-H"};
    map<string, int>rk;
    string R[N  +3];
    int r[N + 3];

void sol(){
    for(int i = 1; i <= N; i++){
        cin >> R[i];
        r[i] = rk[R[i]];
    }

    if(r[1] == r[3] || r[2] == r[4]){
        printf("None\n");
        return ;
    }

    if(r[1] == r[2] || r[3] == r[4]){
        printf("Cis\n");
        return ;
    }

    if(r[1] == r[4] || r[2] == r[3]){
        printf("Trans\n");
        return ;
    }

    if((r[1] < r[3] || r[1] < r[4]) && (r[2] < r[3] || r[2] < r[4])){
        printf("Zasamman\n");
        return ;
    }

    if((r[3] < r[1] || r[3] < r[2]) && (r[4] < r[1] || r[4] < r[2])){
        printf("Zasamman\n");
        return ;
    }

    printf("Entgegen\n");
}

int main(){
    rk.clear();
    for(int i = 0; i < M; i++)
        rk[ba[i]] = i;

    int T;
    scanf("%d\n", &T);
    while(T--)
        sol();

    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3752kb

input:

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

output:

None
Cis

result:

ok 2 lines

Test #2:

score: -100
Wrong Answer
time: 72ms
memory: 3944kb

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
Zasamman
Cis
Zasamman
Trans
None
Trans
Cis
Zasamman
Zasamman
Cis
Cis
Zasamman
Trans
None
Cis
None
Cis
None
None
Zasamman
Cis
None
Zasamman
Zasamman
None
None
Cis
Trans
Zasamman
Zasamman
Zasamman
Trans
Zasamman
None
Zasamman
Trans
Cis
Trans
Zasamman
Trans
None
Zasamman
None
Tr...

result:

wrong answer 5th lines differ - expected: 'Entgegen', found: 'Zasamman'