169 - Xenosemantics

All about problems in Volume 1. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

junbin
Experienced poster
Posts: 174
Joined: Mon Dec 08, 2003 10:41 am

169 - Xenosemantics

Post by junbin »

Can someone with AC code for this question please run the following test data through their code and see if my results are correct?

I've been working on this code for days and I still can't figure out what's wrong with it...

input:

Code: Select all

abcdefdg ppppppp  bcdefdga

p abcdefg pxxxu abcdefg u

w abcdefgd wxt abcdefgd t

skdgh jksdfgjhsgdfjhgasdjfg jksfgjkhasg dfkjg asdfkja sd-
sadf khasdfjgas dfgasdjfg sjadfkasdvjhcxbjgskjehiouwahba-
sduywa4tbmdfnbvjgweknbsknbgajsgdjbfasdhfb87234rnbcv 34%-
sdkufawkbzkjhgjzshgkgsafjgsad

a
b
c

#

output:

Code: Select all

ef
abcdefdg
*
*
*
*
efg
abcdefgd
*
*
sgdfj
asdjf
sfgj
jgasd
*
*
*
*
*
*

Per
A great helper
Posts: 429
Joined: Fri Nov 29, 2002 11:27 pm
Location: Sweden

Post by Per »

Your output is correct.

eflags
New poster
Posts: 1
Joined: Fri Apr 29, 2005 8:57 am

169 - Xenosemantics Helps needed

Post by eflags »

I got WA too. My code works with the sample and the above input. Could anyone with ACC code verify my in/output please.
Input:

Code: Select all

#abcdabcd-
#abcd

dyj@ttdi%sdort^jdyt*rFnn  trlnsvkGHoalexotrjxzasvs-
ozgpsi<>:pkelaovo,.;'slnxt'][-prsjlntrjo-
dyj@ttdi%sdort^jdyt*rFnn  trlnsvkGHoalexotrjxzasvs-
ozgpsi<>:pkelaovo,.;'slnxt'][-prsjlntrjo

asdfsdfg-asdfsdf#asdfsdfg-asdfsdf#asdfsdfg-asdfsdf
zxcvxcvbcvnbxcvbzxcvxcvbcvbn
#
My output:

Code: Select all

abc
bcd
cda
dab
*
*
dyj
yjtt
is
dyjttdisd
disdor
ttdisdort
ortj
jttdisdortjd
tjdyt
rnn
nnt
trl
dortjdytrnntrln
rtjdytrnntrlnsvk
nsvkoa
alex
rlnsvkoalexo
lnsvkoalexot
dytrnntrlnsvkoalexotr
lexotrjxz
vkoalexotrjxza
koalexotrjxzas
trjxzasvs
asvso
ozgp
sdortjdytrnntrlnsvkoalexotrjxzasvsozgps
oalexotrjxzasvsozgpsip
xotrjxzasvsozgpsipk
exotrjxzasvsozgpsipke
svsozgpsipkel
zgpsipkela
sozgpsipkelao
ipkelaovo
aovos
svkoalexotrjxzasvsozgpsipkelaovosl
zasvsozgpsipkelaovosln
rjxzasvsozgpsipkelaovoslnx
jxzasvsozgpsipkelaovoslnxtp
lnxtpr
xzasvsozgpsipkelaovoslnxtprs
nxtprsj
xtprsjl
prsjln
sjlnt
lntr
slnxtprsjlntrj
ytrnntrlnsvkoalexotrjxzasvsozgpsipkelaovoslnxtprsjlntrjo
*
*
asd
df
fs
sd
asdfsdf
sdfsdfg
dfga
fgas
gasd
sdfsdf
dfa
fas
asdfsdfasdfsdf
*
cv
vx
xc
zxcvxcv
vb
bc
cvbcvnb
*
Thank you

OK got ACC now :lol: By the way, the above output is correct.

El-idioto
New poster
Posts: 45
Joined: Mon Jul 14, 2003 9:42 pm
Location: Zoetermeer, The Netherlands

Post by El-idioto »

Ok, I must be extremely dumb, but I don't understand this problem at all.

The example

Code: Select all

#abcdabcd-
#abcd
results in

Code: Select all

abc
bcd
cda
dab
*
Why isn't ab a word?
Why isn't abcd a word?
Why isn't abcda a word?

Could someone please help me and explain this problem?

mf
Guru
Posts: 1244
Joined: Mon Feb 28, 2005 4:51 am
Location: Zürich, Switzerland
Contact:

Post by mf »

First, delete all non-lowercase letters and merge lines, this results in the text:

Code: Select all

_abcdabcdabcd_
(by '_' I mean joker characters, which match any letter)

ab isn't a true word because it occurs as a word only 1 time:
_abc (here, _ matches c)
Its other occurences (dabc) don't count as words, because the spacer characters (d and c) don't match.

abcd isn't a true word, because:
_abcda isn't a word -- the spacer character a appears inside it.
dabcda isn't a word -- the spacer characters don't match.
dabcd_ isn't a word -- there's a d inside the word.

For similar reasons, abcda is not a word, either.

El-idioto
New poster
Posts: 45
Joined: Mon Jul 14, 2003 9:42 pm
Location: Zoetermeer, The Netherlands

Post by El-idioto »

@mf

Aha, ok... now I understand the problem. Many, many thanks for clearing this up for me. I'll get on it :)

El-idioto
New poster
Posts: 45
Joined: Mon Jul 14, 2003 9:42 pm
Location: Zoetermeer, The Netherlands

Post by El-idioto »

Consider the following input:

Code: Select all

skdgh jksdfgjhsgdfjhgasdjfg jksfgjkhasg dfkjg asdfkja sd-
sadf khasdfjgas dfgasdjfg sjadfkasdvjhcxbjgskjehiouwahba-
sduywa4tbmdfnbvjgweknbsknbgajsgdjbfasdhfb87234rnbcv 34%-
sdkufawkbzkjhgjzshgkgsafjgsad
According to junbin and Per this results in:

Code: Select all

sgdfj
asdjf
sfgj
jgasd
*
I also find the word fkjgas.

The positions at which the words occur are:

Code: Select all

sgdfj  [14,18] [ 59, 63]
asdjf  [21,25] [ 69, 73]
sfgj   [29,32] [173,176]
fkjgas [39,44] [169,174]
jgasd  [62,66] [ 68, 72] [74,78] [174,178]
So the words overlap at the following positions:

Code: Select all

sgdfj  [ 59, 63] <-> jgasd  [ 62, 66]
asdjf  [ 69, 73] <-> jgasd  [ 68, 72]
sfgj   [173,176] <-> fkjgas [169,174]
       [173,176] <-> jgasd  [174,178]
fkjgas [169,174] <-> sfgj   [173,176]
       [169,174] <-> jgasd  [174,178]
jgasd  [ 62, 66] <-> sgdfj  [ 59, 63]
       [ 68, 72] <-> asdjf  [ 69, 73]
       [174,178] <-> sfgj   [173,176]
       [174,178] <-> fkjgas [169,174]
Why isn't fkjgas a true word?

mf
Guru
Posts: 1244
Joined: Mon Feb 28, 2005 4:51 am
Location: Zürich, Switzerland
Contact:

Post by mf »

The second occurence of fkjgas does not count as a word, because the spacer character (g) appears inside it.

El-idioto
New poster
Posts: 45
Joined: Mon Jul 14, 2003 9:42 pm
Location: Zoetermeer, The Netherlands

Post by El-idioto »

Could someone please test these inputs?

Code: Select all

a-
x-
ba-
x-
ba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xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-
ba

caeedbdecfacccafeeebcfefacdfdbbcacadfcadebaeaffffadaedcebed-
ccfdbeaccdfeeabfaedbeeccffddcafaccdadbeabfdeaedeccaabcedcef-
babdcfafaffbcbcbeddebabbacabebdbfbbecddbfaffafdfaeccebeccee-
ffdfbeefbcbbdbdffcaadcadccefddbaceaaeccfaedefdfcdabaadebead-
faeafebbdcbbecdebfbefbefdcabababbabccdebfbaebebdbfdfadcfadd-
dfbccbdccefdacfbaadeadffdefaaafcdbdfeaacbeccebcccaefadcabed-
bddcddebdeceabcccddaafcdebfccccfaaaffcdeedabfdebabcfddcffeb-
bbddcecadacaadcbbdbfcedfedcfcbbddefcefafacaaaecdeeccdcdbdff-
bebfdecfdbfdfbadecdfdeacbabeccdaddfddfdaefbabebfeeddebdabdf-
aabaaedfcffbeeabfcdfbfaedebfdbaebecccacbbfafeaebbfaadcedbaf-
cbbdaafbfbecbfabfddfccbdbafdeecdcfcaaeeeaaafdfbebcdbddaeeaf-
eddfbbfdebfabbabdfbddcaabecacbcfbffafaaefddfcdfedaecacecdbe-
afcbbfebbbcefccdfccaefdfafbbeaeefccadacdbdecbdebfdcfbbfbeaa-
ecddadaaaeecccfefbdeacbefbdaddbfaecbdfbceddfefaeccfddacaaad-
ecefdfabddcbcdbdbedededfdbeeedebcbbccebbffacaffecadaabceefb-
defbbfdebcadffdecdffdedbbecfcaedffceecbbbecefeedeeabcdebfff-
dbcbcfefaaddeeefeaadbabbeaadfefdfcccdffeedeafacdeedbfdcd

bdccedfcaadccafbdcafffdcdfbddeefebdcdacfffdbbaceddbbfebdced-
aeccfdaabdbbddcbfefebfefecdcabfbccacaabfdeeebbadbeafedabbec-
aecceccecfcfcefcedcdbdeeddccbdecedecaedbbbaaceacffeeddfdccc-
dbcbcccedecebfebfaacaccfedfdafdcbbacebdfaababecceddfcbeceec-
faaeacbcabcccabdaadfdfeecffefaeabbbdbbbcdebaaddafecadefbaae-
abcddbacdcdeecbcdcecbaedfeeccaaecfcbaedddececadbaceccafcebf-
babefbcacefeefebcbcdabdddebfcccdfedcafbccfeeddabffebcafebde-
cfdcdcdbcdefcbddbfebdfcaeeeeacbacdaacefbbbdfccbbdaafbcbcbcb-
dddfaebecadaaadbbcfddcadcdafcebffecddebacedacfbdebadbbdbdeb-
ebbdfbcbdeefebbdfefddceadabfbdfaaffabedaeedfefdcfbdffbacedd-
aedfacdfebcbbafcfedcaadfdfdddfbfcecededeaefbcfedaeedeebcadc-
beabbfbebcafbccfcdcfcfcbfebbdbebfdffcbbbfdfbebabfaabcaafbee-
accabeeefdbfdccbffbceeebeeabbcceecefbeacacbffedccffcdfdfcbb-
aeeeeefbbbebdeabfdaabbfbfdcacdabdfddcbabdebebecfebbaefbddcd-
eaadaaecfeacabbbcfdabfdfdcaacaaecdfeaaccfbebcdddabaffacbedd-
fbdcdffbcffcceceebadafaccbdaaebbeadcebbfecfdaeccbefeebbcbeb-
cbbbffcafbfedddbcaebbfdafcdfffecaebfebbcabefbdbfcfdffddf

cbcbcbdafcbbdcdeeecffaeaeefdfcbaedbbdefaacccfeeebdebeeeccbe-
fcaccdddaeedaecbabeaadebfcdbbbfbdabdcddaaaeaabfebafbedbfbaa-
eabaeeacbdefddfdcfebdfabaeddadeacfecabacfbefcbdccfabbcfbefd-
aaccedeaeeaecabaaaaebcffafcedaddbdebbddeaaedbefbfedddbfbdaa-
beaffdcbfcdabdfffcbdbbdecdefdfcecbabebedaeefeebfedcecebdbcf-
adcbccbaadecebefadcdeddccffecfffcffbaddfaccacccfbaeccfbbdeb-
fffdccfecaddbbbecdddebadebeccbddfcdfbbabcfdeceaefbdeececcbe-
facbcddfcddafecabeeebeefcacddedfffbefffafedfbbdbbcddbcedadf-
bbbdafaacdaacebaebebdaacdddcbdbbcaceddfeacfafcfdcdbebaafded-
eaefccadfacfbedebbcabbedacdeacaaeafbebcdeadbcbbdffbbebaedbb-
fbcaeafbacbfbdbdfbbffeacfbfcabbbacfafabafecadeebaaeebcafceb-
ebcadffadefbaeeaecbcedcbbebfbbdfceaecdebbcaeecfdbdbebcbebef-
fcadcfbefdfdedcddbedaceacddadebfdbedaaeacbfabacdbdfcacccdfa-
fbfdfaceebdcdefeefffadcbeeeebcffbbcddeeadacccfacfffbecdcecd-
cffeeadafffedcbaeabfadbdfbbefceaecadfabfffddfbbdfeebfcbeefb-
abefcdaafaddcbbeeddaaeaffbedceeaeabbeabddbddcafdfaeecdbabfe-
aeabebffebbbdbafcbceffaacabedacbbdaaecfcbbbfdbffbebeeceb

bdbadcefceaeeddffcceaebdbaefbadbfddfbbececcbdacccceaebbffec-
dcbddabbefcabcdadecfedbeeaceeeadfebfeeddedbbbcfbcabdffddbea-
fecedaeecbfeaadbdbbdbbddfedacbcebabbeaefcafecdbfddcfbbadccd-
dcaaefddfbacfeabdcbddfadbfcfcaeafcffacbeedcacbcddceaddbbcda-
ceeeceafbacdbbadeeedefbfcaeaecdcdfffcededdcbcffeccabdaafccf-
bceedaeceaddfefaebcddacbceebcbdabdaecabefdebdacabaeddcaecfd-
bdbebdbaedfaeebcdcfdbcbfaaaafdebabebbcaffcccbefeefbfacdbefd-
bebbddcadefebbbafeebfffeecafbdddbeabbaffafadaafdfadccecbaac-
feeceaccededacbdcceaafddecefbaecaefdefcbbacebcbdfebeecceacb-
facadafdbbfacebbedeabddcdaaeecfcedecddcbacabcaeaacedbddcaff-
afcdfbcafebfadacffddaafdfafeebfbddcafefbbaeaddfcfeefaeafffd-
eacfeaacfbfcaeaacfccafedeaaaebacafbffacbeecfccedfbafadfdcfb-
dfccafadfbfbaddedcfbeedeafaaedcbafcecdcbbaecdbedabcadfcfdbb-
ffaefdadcccecdaccbacdbebdfabeaaebceecbaacbeccdaceadbbdcdbfe-
dcddbddcfccdadfefdbefaaaaaaabfbdbbcebdafeecbfeeadafaaeffbce-
eedffebaaccdedfbeeeaeaaadcfbffebcfeafddbfbfeaddfadfadffadec-
fcdbbfdbbdbcabbcdecbcaccaafedcfcbcdddabacdaccdbebfcaedae

efdfbaecfacaeaefadfaccdcccccffaedafdbdacbefcadcefddbccabeab-
fafbeaeceeaecccdcadafbdabcddefeaebdedadedcdfedccaecebbeaedd-
defacdffbcfeddfcedeeeadeedcedbeadbcaeefccfeffbffbaccdbeddfe-
ecbaedbdededfdfccfacbcecefccbdefaadfbdedaeffaebdaccaffeebfd-
dddccafafebbfecaaadebbeeafecebcabbbeacdbcfbdffaaefbbbdddfcf-
dadacaedeccaddddbdbbadffaceaeccafbcbfedcfbeacebfabeadfabcbd-
badbbcfaaebcaabbbbddacbcdfdcdbaaeaebebcffaffdaadbcabddfbcde-
fccbdabcebffdcaefcebdabaacebfdbcdedebfaccdfecedeffedcedbdbf-
bcbababbfcfabadceafcddcbacdfdabbfbacffefcebbfcdacbbcfccffda-
faeabcfaeecdbbdcaafddacbdcefcfbcbfbccbccffaeacdeeecaedddafb-
abaadebfaffbdcfaeebdbcdfadaeacdbefffdabeaeccfafbfcccfdfcdfa-
beaceeedfdadcccabadccccfcaeccfbbcbffaccccdabfbdeabacdddaadc-
eebcdbcabbfcefdcaafedeecdfecaabdbacbfcfacaaeeccbdfdfcfbaffe-
ecceaabaceaacfdfdffcacffddacdbdfeceaccbdedbefadadacffefdfaa-
eeeafcdeccacbbcaafcdaaadaacbcaffaafebbcdcfaabfbcababbfffdca-
babbeacebadbbccedcfcbaccffbdcddffacbccbfbbdfbfcbfeaffafbaba-
bfceabcceacffddbccdaaadecdcdebceafcafaaadfbbdbdabecdacfd
#
Outputs

Code: Select all

ax
xb
ba
*
*
axxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxb
ba
*
*
*
*
ca
caeed
fa
bcf
fefa
acd
dfc
fca
deb
ba
ae
dc
ebed
edccfd
fdbea
ccdfee
eeab
bf
faed
db
ccd
bfde
eae
ed
cefbab
fafaffb
aca
ecdd
ff
fdf
cc
aad
ad
ccef
ce
ccfa
ef
fc
df
adfa
aea
bbe
be
bfba
addd
fbccb
ecce
cabe
ee
ffcdeed
cdeedab
abf
fde
fdd
ddc
ceca
cbb
bfce
ced
bbddef
bfd
badecd
cdfd
efb
beeab
fcdf
ebbf
dcedb
bec
cdb
eafc
deac
ddbf
ecef
*
*
bd
bdcc
edf
fcaa
aad
dcc
ccafb
cafff
dcd
fb
da
fffdbba
bbace
fe
ce
eccfd
eb
abfb
bfbcc
ccacaa
fdeee
dbe
af
beafe
ca
ae
cfcfc
fc
ccb
ece
ede
bba
ace
eddf
ab
bbbc
cde
dd
fec
cad
ecade
defb
bcddb
bac
df
ceb
fcebfb
bfbab
afb
ffe
bcaf
bc
bfeb
cd
bbbd
dfcc
bbcf
ebace
eda
ff
aee
dff
fac
fbcf
eacac
ecfe
aef
cfda
aaccfb
*
*
dafc
bbd
cbbdcdeeec
aed
bb
dbbd
bd
de
ccb
bef
aee
eed
da
ecb
cbab
be
aad
eaade
ebfc
ab
bdcdd
fe
eba
af
bafb
bedb
dbfbaa
aba
ee
acbd
dc
ebd
dfa
acf
cfec
efc
dccfa
cf
aacce
ec
ebcff
ebb
eaae
ddeaaed
fbf
befbfe
bfb
dcb
bf
bebed
eeb
baade
ecebefa
ffe
badd
ddf
fbae
aeccf
ebfff
dcc
ecc
bddf
cdda
eefcacddedfff
dfffb
bbc
cdd
ae
eac
faf
fd
ccad
ac
abbeda
dff
cad
deeb
eebc
dcbb
edcbaeab
*
*
bdb
ba
ef
fc
bdba
aef
efb
ad
bf
bda
cb
dda
efca
bcd
dade
db
fedbeea
ac
adf
eb
af
edaee
cbf
feaad
bb
ddfedac
ce
bbe
efc
fcaf
eaefcafecd
ecdb
ddc
fddcf
fbbad
caaef
bac
dc
dbfcfc
caea
aeaf
ffa
cea
eaddbb
acd
cdbb
bba
aeae
caeaecdcd
ffe
ece
cddac
eeb
bdabdae
fd
efde
daca
ae
bae
edf
fdb
bebbc
bfff
aaf
fdf
dccecb
baa
acc
fba
de
fdbbf
daaee
aca
aeaa
ddcafef
aea
deac
cfcc
cced
fcecdcbb
abca
*
*
ef
efdfb
baec
ecf
fa
ad
df
ed
aeda
dac
dafdbdacb
bef
cbefc
fcadc
efddb
be
ea
bf
faf
abfafb
eeae
ca
afb
abc
bd
dcdf
dcca
bb
efac
dffb
bc
edd
dc
ce
bea
ead
dbc
aeef
cc
ddf
eddfeec
ebd
ebb
bbf
febbfec
eacd
cf
bcfb
aae
acae
dff
bcb
bfed
edc
fbea
eace
cebf
bfab
ba
cfaae
ebc
acbc
fbc
bcde
def
cdefcc
bdab
bcebffdc
aef
ebfdb
dbcdedeb
acbbcfccff
aeabc
cdf
bdb
bdfdf
ffdda
cbc
*

mf
Guru
Posts: 1244
Joined: Mon Feb 28, 2005 4:51 am
Location: Zürich, Switzerland
Contact:

Post by mf »

I get this output:
(Note: lines are wrapped to 80 characters)

Code: Select all

ax
xb
ba
*
*
axxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx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fa
ef
fc
df
adfa
aea
bbe
be
bfba
addd
fbccb
ecce
cabe
ee
ffcdeed
abf
fde
fdd
ddc
ceca
cbb
bfce
ced
bbddef
bfd
badecd
cdfd
efb
beeab
fcdf
ebbf
dcedb
bec
cdb
eafc
deac
ddbf
ecef
*
*
bd
bdc
bdcc
edf
fcaa
aad
dcc
ccafb
cafff
dcd
fb
da
fffdbba
bbace
fe
ce
eccfd
eb
abfb
bfbcc
ccacaa
fdeee
dbe
af
beafe
ca
ae
cfcfc
fc
ccb
ece
ede
bba
ace
eddf
ab
bbbc
cde
dd
fec
cad
ecade
defb
bcddb
bac
df
ceb
fcebfb
bfbab
afb
ffe
bcaf
bc
bfeb
cd
bbbd
dfcc
bbcf
ebace
eda
ff
aee
dff
fac
fbcf
eacac
ecfe
aef
cfda
aaccfb
*
*
cbc
dafc
bbd
cbbdcdeeec
aed
bb
dbbd
bd
de
bef
aee
eed
da
ecb
cbab
be
aad
eaade
ebfc
ab
bdcdd
fe
eba
af
bafb
bedb
dbfbaa
aba
ee
acbd
dc
ebd
dfa
acf
cfec
efc
dccfa
cf
aacce
ec
ebcff
ebb
eaae
ddeaaed
fbf
befbfe
bfb
dcb
bf
bebed
eeb
baade
ecebefa
ffe
badd
ddf
fbae
aeccf
ebfff
dcc
ecc
bddf
cdda
eefcacddedfff
dfffb
bbc
cdd
ae
eac
faf
fd
ccad
ac
abbeda
dff
cad
deeb
eebc
dcbb
edcbaeab
*
*
bdb
bdba
ba
ef
fc
aef
efb
ad
bf
bda
cb
dda
efca
bcd
dade
db
fedbeea
ac
adf
eb
af
edaee
cbf
feaad
bb
ddfedac
ce
bbe
efc
fcaf
eaefcafecd
ecdb
ddc
fddcf
fbbad
caaef
bac
dc
dbfcfc
caea
aeaf
ffa
cea
eaddbb
acd
cdbb
bba
aeae
caeaecdcd
ffe
ece
cddac
eeb
bdabdae
fd
efde
daca
ae
bae
edf
fdb
bebbc
bfff
aaf
fdf
dccecb
baa
acc
fba
de
fdbbf
daaee
aca
aeaa
ddcafef
aea
deac
cfcc
cced
fcecdcbb
abca
*
*
ef
efd
efdfb
baec
ecf
fa
ad
df
ed
aeda
dac
dafdbdacb
bef
cbefc
fcadc
efddb
be
ea
bf
faf
abfafb
eeae
ca
afb
abc
bd
dcdf
dcca
bb
efac
dffb
bc
edd
dc
ce
bea
ead
dbc
aeef
cc
ddf
eddfeec
ebd
ebb
bbf
febbfec
eacd
cf
bcfb
aae
acae
dff
bcb
bfed
edc
fbea
eace
cebf
bfab
ba
cfaae
ebc
acbc
fbc
bcde
cdefcc
bdab
bcebffdc
aef
ebfdb
dbcdedeb
acbbcfccff
aeabc
cdf
bdb
bdfdf
ffdda
cbc
*

El-idioto
New poster
Posts: 45
Joined: Mon Jul 14, 2003 9:42 pm
Location: Zoetermeer, The Netherlands

Post by El-idioto »

@MF
Your solutions aren't correct! (?)

Input:

Code: Select all

a-
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-
ba-
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-
ba
Your Output:

Code: Select all

axxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxb
ba
Which is wrong, because you have words which are 251 long (which violates the rule a word may only be 250 long).


Input:

Code: Select all

caeedbdecfacccafeeebcfefacdfdbbcacadfcadebaeaffffadaedcebed-
ccfdbeaccdfeeabfaedbeeccffddcafaccdadbeabfdeaedeccaabcedcef-
babdcfafaffbcbcbeddebabbacabebdbfbbecddbfaffafdfaeccebeccee-
ffdfbeefbcbbdbdffcaadcadccefddbaceaaeccfaedefdfcdabaadebead-
faeafebbdcbbecdebfbefbefdcabababbabccdebfbaebebdbfdfadcfadd-
dfbccbdccefdacfbaadeadffdefaaafcdbdfeaacbeccebcccaefadcabed-
bddcddebdeceabcccddaafcdebfccccfaaaffcdeedabfdebabcfddcffeb-
bbddcecadacaadcbbdbfcedfedcfcbbddefcefafacaaaecdeeccdcdbdff-
bebfdecfdbfdfbadecdfdeacbabeccdaddfddfdaefbabebfeeddebdabdf-
aabaaedfcffbeeabfcdfbfaedebfdbaebecccacbbfafeaebbfaadcedbaf-
cbbdaafbfbecbfabfddfccbdbafdeecdcfcaaeeeaaafdfbebcdbddaeeaf-
eddfbbfdebfabbabdfbddcaabecacbcfbffafaaefddfcdfedaecacecdbe-
afcbbfebbbcefccdfccaefdfafbbeaeefccadacdbdecbdebfdcfbbfbeaa-
ecddadaaaeecccfefbdeacbefbdaddbfaecbdfbceddfefaeccfddacaaad-
ecefdfabddcbcdbdbedededfdbeeedebcbbccebbffacaffecadaabceefb-
defbbfdebcadffdecdffdedbbecfcaedffceecbbbecefeedeeabcdebfff-
dbcbcfefaaddeeefeaadbabbeaadfefdfcccdffeedeafacdeedbfdcd
Your output contains ?caeedbdE (pos=0) . This violates the rule that the marker (E) may not be contained within the word itself.

Your output doesn't contain FcdeedabF (pos=391). This word is repeated as FacdeedbF (pos=989). This word is overlapped by the word AffcdeedA (pos=389) (which you do have).
Why didn't you flag cdeedab as true word?


Input:

Code: Select all

bdccedfcaadccafbdcafffdcdfbddeefebdcdacfffdbbaceddbbfebdced-
aeccfdaabdbbddcbfefebfefecdcabfbccacaabfdeeebbadbeafedabbec-
aecceccecfcfcefcedcdbdeeddccbdecedecaedbbbaaceacffeeddfdccc-
dbcbcccedecebfebfaacaccfedfdafdcbbacebdfaababecceddfcbeceec-
faaeacbcabcccabdaadfdfeecffefaeabbbdbbbcdebaaddafecadefbaae-
abcddbacdcdeecbcdcecbaedfeeccaaecfcbaedddececadbaceccafcebf-
babefbcacefeefebcbcdabdddebfcccdfedcafbccfeeddabffebcafebde-
cfdcdcdbcdefcbddbfebdfcaeeeeacbacdaacefbbbdfccbbdaafbcbcbcb-
dddfaebecadaaadbbcfddcadcdafcebffecddebacedacfbdebadbbdbdeb-
ebbdfbcbdeefebbdfefddceadabfbdfaaffabedaeedfefdcfbdffbacedd-
aedfacdfebcbbafcfedcaadfdfdddfbfcecededeaefbcfedaeedeebcadc-
beabbfbebcafbccfcdcfcfcbfebbdbebfdffcbbbfdfbebabfaabcaafbee-
accabeeefdbfdccbffbceeebeeabbcceecefbeacacbffedccffcdfdfcbb-
aeeeeefbbbebdeabfdaabbfbfdcacdabdfddcbabdebebecfebbaefbddcd-
eaadaaecfeacabbbcfdabfdfdcaacaaecdfeaaccfbebcdddabaffacbedd-
fbdcdffbcffcceceebadafaccbdaaebbeadcebbfecfdaeccbefeebbcbeb-
cbbbffcafbfedddbcaebbfdafcdfffecaebfebbcabefbdbfcfdffddf
Your output contains ?bdcC (pos=0) . This violates the rule that the marker (C) may not be contained within the word itself.


I haven't checked the other solutions, but surely your output is incorrect(?) How is it possible you got AC?

mf
Guru
Posts: 1244
Joined: Mon Feb 28, 2005 4:51 am
Location: Zürich, Switzerland
Contact:

Post by mf »

You're right. Perhaps input for this problem is not very good...
Notify the admins.

El-idioto
New poster
Posts: 45
Joined: Mon Jul 14, 2003 9:42 pm
Location: Zoetermeer, The Netherlands

Post by El-idioto »

@MF
Could you email me your source code? I will try to fix both our programs (and mail you back the changes I made to your program to fix your bugs).

This way, I can generate 1000s of inputs and test against both our programs to see why I get WA.

Abednego
A great helper
Posts: 281
Joined: Tue Sep 10, 2002 5:14 am
Location: Mountain View, CA, USA
Contact:

Re: 169 - Xenosemantics

Post by Abednego »

In the sample input case #1, why isn't "is" a word?
It appears twice: as "disd" and as "psip".
Both occurrences are overlapped by other words:
"disd" is overlapped by "tdisdort", and
"psip" is overlapped by "ozgpsipkelao".

I think the sample output should be

Code: Select all

dyj
is
ortj
lnsvkoalexot
*
*
What am I understanding incorrectly?
If only I had as much free time as I did in college...

lantimilan
New poster
Posts: 11
Joined: Sat Mar 19, 2005 11:12 am
Location: HKU
Contact:

Re: 169 - Xenosemantics

Post by lantimilan »

Anyone has additional testcases, or care to point to me some tricky interpretation of the problem?
Have matched all testcases here, and my code output for the last case agrees with El-Idioto.

Also for the following case:
abcabc-
#
#
The output should be
ab
bc
*
Correct?
-- This is Unix, any explanatory error message is seen as a sign of weakness

Post Reply

Return to “Volume 1 (100-199)”