QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#152673#7070. IsomerismPetroTarnavskyi#AC ✓40ms3600kbC++171.2kb2023-08-28 16:46:562023-08-28 16:46:56

Judging History

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

  • [2023-08-28 16:46:56]
  • 评测
  • 测评结果:AC
  • 用时:40ms
  • 内存:3600kb
  • [2023-08-28 16:46:56]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;

#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define RFOR(i, a, b) for (int i = (a) - 1; i >= (b); i--)
#define FILL(a, b) memset(a, b, sizeof(a))

#define SZ(a) int(a.size())
#define ALL(a) a.begin(), a.end()
#define PB push_back
#define MP make_pair
#define F first
#define S second

typedef long long LL;
typedef vector<int> VI;
typedef pair<int, int> PII;
typedef double db;

int main()
{
	ios::sync_with_stdio(0);
	cin.tie(0);
	
	 map<string, int> m;
	 m["-F"] = 0;
	 m["-Cl"] = 1;
	 m["-Br"] = 2;
	 m["-I"] = 3;
	 m["-CH3"] = 4;
	 m["-CH2CH3"] = 5;
	 m["-CH2CH2CH3"] = 6;
	 m["-H"] = 7;
	 
	 int t;
	 cin >> t;
	 while (t--)
	 {
		 string r1, r2, r3, r4;
		 cin >> r1 >> r2 >> r3 >> r4;
		 
		 set<string> s;
		 s.insert(r1);
		 s.insert(r2);
		 s.insert(r3);
		 s.insert(r4);
		 
		 if (r1 == r3 || r2 == r4)
			cout << "None\n";
		else if (SZ(s) < 4)
		{
			if (r1 == r2 || r3 == r4)
				cout  << "Cis\n";
			else
				cout << "Trans\n";
		}
		else
		{
			if ((m[r1] < m[r3] && m[r2] < m[r4]) || (m[r3] < m[r1] && m[r4] < m[r2]))
				cout << "Zasamman\n";
			else
				cout << "Entgegen\n";
		}
	 }
	
}

这程序好像有点Bug,我给组数据试试?

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

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

output:

None
Cis

result:

ok 2 lines

Test #2:

score: 0
Accepted
time: 40ms
memory: 3600kb

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