QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#732015 | #7070. Isomerism | Yurily# | WA | 72ms | 3944kb | C++20 | 1.2kb | 2024-11-10 12:44:14 | 2024-11-10 12:44:14 |
Judging History
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: 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'