QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#693266 | #7070. Isomerism | ucup-team4352# | AC ✓ | 21ms | 3608kb | C++23 | 794b | 2024-10-31 15:51:01 | 2024-10-31 15:51:04 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
int T;
string R1,R2,R3,R4;
void zh(string s,int &x) {
if(s=="-F") x=1;
if(s=="-Cl") x=2;
if(s=="-Br") x=3;
if(s=="-I") x=4;
if(s=="-CH3") x=5;
if(s=="-CH2CH3") x=6;
if(s=="-CH2CH2CH3") x=7;
if(s=="-H") x=8;
}
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cin>>T;
while(T--) {
cin>>R1>>R2>>R3>>R4;
if(R1==R3||R2==R4) cout<<"None\n";
else if(R1==R2||R3==R4) cout<<"Cis\n";
else if(R1==R4||R2==R3) cout<<"Trans\n";
else {
int t1=0,t2=0,t3=0,t4=0;
zh(R1,t1),zh(R2,t2),zh(R3,t3),zh(R4,t4);
if((t3<t1&&t4<t2)||(t3>t1&&t4>t2)) cout<<"Zasamman\n";
else cout<<"Entgegen\n";
}
}
return 0;
}/*
6
-H -H -H -Cl
-F -F -Br -Cl
-F -Cl -Cl -F
-I -H -F -Cl
-F -Cl -I -H
-I -Cl -F -H
*/
这程序好像有点Bug,我给组数据试试?
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3608kb
input:
2 -H -H -H -Cl -F -F -Br -Cl
output:
None Cis
result:
ok 2 lines
Test #2:
score: 0
Accepted
time: 21ms
memory: 3552kb
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