QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#635415 | #7070. Isomerism | qinglu09 | WA | 35ms | 3832kb | C++14 | 963b | 2024-10-12 19:44:46 | 2024-10-12 19:44:46 |
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()<=2)
{
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;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3832kb
input:
2 -H -H -H -Cl -F -F -Br -Cl
output:
None Cis
result:
ok 2 lines
Test #2:
score: -100
Wrong Answer
time: 35ms
memory: 3612kb
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 Zasamman Cis Zasamman Trans None Trans Cis Entgegen Entgegen Cis None Entgegen Trans None Cis None Cis None None Zasamman Cis None Entgegen Entgegen None None Cis Trans Zasamman Zasamman Zasamman Trans Entgegen None Zasamman None Cis Trans Zasamman Trans None Zasamman None Tr...
result:
wrong answer 5th lines differ - expected: 'Entgegen', found: 'Zasamman'