QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#693266#7070. Isomerismucup-team4352#AC ✓21ms3608kbC++23794b2024-10-31 15:51:012024-10-31 15:51:04

Judging History

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

  • [2024-10-31 15:51:04]
  • 评测
  • 测评结果:AC
  • 用时:21ms
  • 内存:3608kb
  • [2024-10-31 15:51:01]
  • 提交

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