QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#684414#7070. IsomerismZhi_zI#AC ✓25ms3804kbC++171.6kb2024-10-28 13:16:202024-10-28 13:16:20

Judging History

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

  • [2024-10-28 13:16:20]
  • 评测
  • 测评结果:AC
  • 用时:25ms
  • 内存:3804kb
  • [2024-10-28 13:16:20]
  • 提交

answer

#include <bits/stdc++.h>

/* Orther */
#define int long long
#define YES cout<<"YES\n"
#define NO cout<<"NO\n"
#define IOS ios::sync_with_stdio(false);cin.tie(0); cout.tie(0)
using namespace std;

/* Pair */
#define x first
#define y second

/* Data type */
using ll = long long;
using ull = unsigned long long;
using PII = pair<int,int>;
using VI = vector<int>;
using VPII = vector<PII>;

/* STL */
#define eb emplace_back
#define ef emplace_front
#define pb push_back
#define pf push_front
#define mp make_pair
#define all(x) x.begin(),x.end()
#define rall(x) x.rbegin(),x.rend()
#define all1(x) x.begin()+1,x.end()
#define sz size

/* Random */
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
#define random(a,b) rng()%(b-a+1)+a

/* Contest */
const int INF = 0x3f3f3f3f , LLONGMAX = 1e18 ; // 1e9
const int MOD =  998244353 ;
const int N = 2e5 + 10, M = 55;

map<string,int> m;
void init() {
	m["-F"] = 1;
	m["-Cl"] = 2;
	m["-Br"] = 3;
	m["-I"] = 4;
	m["-CH3"] = 5;
	m["-CH2CH3"] = 6;
	m["-CH2CH2CH3"] = 7;
	m["-H"] = 8;
}

void Rainbow_()
{
    string s1,s2,s3,s4;
    cin >> s1 >> s2 >> s3 >> s4 ;
    
    if ( s1 == s3 || s2 == s4 ) {
    	cout << "None\n";
    } else if (s1 == s2 || s3 == s4 ) {
    	cout << "Cis\n";
    } else if (s1 == s4 || s2 == s3 ) {
    	cout << "Trans\n";
    } else {
		if (m[s1] < m[s3] && m[s2] < m[s4] || m[s1] > m[s3] && m[s2] > m[s4]) {
			cout << "Zasamman\n";
		} else {
			cout << "Entgegen\n";
		}
    }
}
 
signed main()
{   
    IOS;
    int _ = 1;
    cin >> _;
 	init();
    while ( _ -- ) 
        Rainbow_();
 
    return 0;
}

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

详细

Test #1:

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

input:

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

output:

None
Cis

result:

ok 2 lines

Test #2:

score: 0
Accepted
time: 25ms
memory: 3804kb

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