QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#354359 | #7070. Isomerism | crsfaa# | WA | 88ms | 3772kb | C++14 | 856b | 2024-03-15 10:50:18 | 2024-03-15 10:50:19 |
Judging History
answer
#include<bits/stdc++.h>
#define Yukinoshita namespace
#define Yukino std
using Yukinoshita Yukino;
int read()
{
int s=0,w=1;
char ch=getchar();
while(ch<'0'||ch>'9') w=ch=='-'?-1:1,ch=getchar();
while(ch>='0'&&ch<='9') s=s*10+ch-'0',ch=getchar();
return s*w;
}
vector<string> st{"-F", "-Cl", "-Br", "-I", "-CH3", "-CH2CH3", "-CH2CH2CH3", "H"};
bool cmp(string x,string y)
{
return (lower_bound(st.begin(),st.end(),x)-st.begin())>(lower_bound(st.begin(),st.end(),y)-st.begin());
}
int main()
{
int T=read();
while(T--)
{
string r1,r2,r3,r4;
cin>>r1>>r2>>r3>>r4;
if(r1==r3||r2==r4) puts("None");
else if(r1==r2||r3==r4) puts("Cis");
else if(r1==r4||r2==r3) puts("Trans");
else if(max(r1,r3,cmp)==r1&&max(r2,r4,cmp)==r2||max(r1,r3,cmp)==r3&&max(r2,r4,cmp)==r4) puts("Zasamman");
else puts("Entgegen");
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3596kb
input:
2 -H -H -H -Cl -F -F -Br -Cl
output:
None Cis
result:
ok 2 lines
Test #2:
score: -100
Wrong Answer
time: 88ms
memory: 3772kb
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 Entgegen Trans None Trans Cis Entgegen Zasamman Cis Cis Zasamman Trans None Cis None Cis None None Zasamman Cis None Zasamman Entgegen None None Cis Trans Zasamman Zasamman Entgegen Trans Zasamman None Entgegen Trans Cis Trans Zasamman Trans None Entgegen None Tr...
result:
wrong answer 5th lines differ - expected: 'Entgegen', found: 'Zasamman'