QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#731919#7070. IsomerismYurily#WA 79ms4004kbC++201.2kb2024-11-10 12:16:562024-11-10 12:17:04

Judging History

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

  • [2024-11-10 12:17:04]
  • 评测
  • 测评结果:WA
  • 用时:79ms
  • 内存:4004kb
  • [2024-11-10 12:16:56]
  • 提交

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

詳細信息

Test #1:

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

input:

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

output:

None
Cis

result:

ok 2 lines

Test #2:

score: -100
Wrong Answer
time: 79ms
memory: 3792kb

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'