QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#635461 | #7070. Isomerism | qinglu09 | AC ✓ | 36ms | 3572kb | C++14 | 964b | 2024-10-12 19:52:27 | 2024-10-12 19:52:28 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define endl '\n'
const int N=1e3+10;
#define debug(x) cout<<#x<<": "<<x<<endl;
typedef pair<int,int> PII;
map<string,int>mp;
void solve()
{
int a[5];
set<int>st;
for(int i=1;i<=4;i++)
{
string s;
cin>>s;
a[i]=mp[s];
st.insert(a[i]);
}
if(st.size()==1)
{
cout<<"None"<<endl;
}
else if(st.size()<=3)
{
if(a[1]==a[3]||a[2]==a[4]) cout<<"None"<<endl;
else if(a[1]==a[2]||a[3]==a[4]) cout<<"Cis"<<endl;
else cout<<"Trans"<<endl;
}
else
{
if(a[1]>a[3]&&a[2]>a[4]||a[1]<a[3]&&a[2]<a[4])
{
cout<<"Zasamman"<<endl;
}
else cout<<"Entgegen"<<endl;
}
}
int main()
{
ios::sync_with_stdio(0);
cin.tie(0),cout.tie(0);
int T=1;
cin>>T;
mp["-F"]=8;
mp["-Cl"]=7;
mp["-Br"]=6;
mp["-I"]=5;
mp["-CH3"]=4;
mp["-CH2CH3"]=3;
mp["-CH2CH2CH3"]=2;
mp["-H"]=1;
while(T--)
{
solve();
}
return 0;
}
这程序好像有点Bug,我给组数据试试?
詳細信息
Test #1:
score: 100
Accepted
time: 1ms
memory: 3572kb
input:
2 -H -H -H -Cl -F -F -Br -Cl
output:
None Cis
result:
ok 2 lines
Test #2:
score: 0
Accepted
time: 36ms
memory: 3572kb
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