LA-2894 Strange Research

Do you want to discuss about these problems? Go now!
Users are shared (no need to re-register).

Moderator: Board moderators

Post Reply
ayeshapakhi
Learning poster
Posts: 60
Joined: Sun Apr 16, 2006 7:59 pm

LA-2894 Strange Research

Post by ayeshapakhi » Sat Aug 25, 2007 8:58 pm

Please someone have a look at the prob
http://acmicpc-live-archive.uva.es/nuev ... php?p=2894

I got several WA..... but couldn't find what's missing...:(
Please help..

Code: Select all

Removed.....
Regards...
Last edited by ayeshapakhi on Fri Aug 31, 2007 7:56 am, edited 1 time in total.

ayeshapakhi
Learning poster
Posts: 60
Joined: Sun Apr 16, 2006 7:59 pm

Post by ayeshapakhi » Mon Aug 27, 2007 1:02 pm

Please someone help......

i admit that the code is a bit lengthy....but it's straight forward sorting and searching....:(

or someone pls provide some i/o..
thanks

User avatar
A1
Experienced poster
Posts: 173
Joined: Wed Jan 28, 2004 3:34 pm
Location: Bangladesh

Post by A1 » Fri Aug 31, 2007 3:27 am

I think sample test case make you confused!!

just do this:
scanf("%d\n",&q);

ayeshapakhi
Learning poster
Posts: 60
Joined: Sun Apr 16, 2006 7:59 pm

Post by ayeshapakhi » Fri Aug 31, 2007 7:58 am

To A1.....

Really thanks.. :)
That easy bug killed a lot of time..

Regards.....:)

User avatar
sbaldrich
New poster
Posts: 3
Joined: Tue Aug 20, 2013 4:49 am

Re: LA-2894 Strange Research

Post by sbaldrich » Tue Aug 20, 2013 4:53 am

Could you please post some test data? I've been trying to solve this problem for days with no luck :( (I know this is a really old thread, I just hope someone reads this)

brianfry713
Guru
Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

Re: LA-2894 Strange Research

Post by brianfry713 » Tue Aug 20, 2013 9:49 pm

This is the same as problem 12055. Input:

Code: Select all

1000
ae
h
l
inncolyc
vlxsu
ahl
bhzlgcpg
ftrphe
vrszann
fjjgqw
rd
fkzwsi
mzrtflq
esztha
qk
jiec
bhyaesj
e
bzqnsnt
omron
yush
xvce
dknm
syurojj
cv
qoge
g
s
bpkewfhg
vbntvgkg
nknha
ngctjwj
ovq
bzswutl
qrcwjrg
yjdnphjy
ulrpbd
dwoxp
pitt
clpdjyg
pngq
abmreqkh
ahd
ynv
uzdjdoj
ny
voux
gpyw
fkboqfpd
hxemija
uqqv
grjyyyww
djeu
kjcosc
gkbgeyy
vkcntan
yl
euyav
lazfc
lo
rsvq
scrfvtu
ugmacmc
xnyys
rdsowll
beq
lnqgfmm
moeoobdo
vqsajjww
nzadu
tmsyygs
wwa
zd
aa
u
d
yzalaarw
m
gkg
eslau
bzxdz
ybudav
lwgesu
dddlrhg
kacnc
rbtrdou
lashgx
cpffs
zay
mbgzdiqe
hj
eqdejm
iqoxxwq
vsoaepi
ss
zwhip
bu
khbs
sp
ohnlzb
ftwllo
kmqv
eww
ifzc
rtch
pucqhilf
xugjgygk
e
aomzqt
kvz
ktpd
z
iuneczm
fxfmghau
roybj
ow
fbxfp
bfleezhj
oxewyze
pdsy
i
z
xy
p
wu
cytlj
bhw
hvew
jql
yjon
oiytgsnk
hxbzykv
rtgpfpf
efevvnj
lfldsx
buycuj
u
t
sarzv
hzv
m
hxlucgr
hl
khikclfe
fygcyn
trnzym
uorlnayl
gtyke
qllqsnoh
hzej
twuhnh
pi
eqbcaig
v
jpgzxx
ycsz
oved
bsljybnb
vjxq
igi
firfm
ej
cn
fru
ctvpw
mfxfhgn
oszfzlqf
n
kpod
gfgd
cfjj
oqlb
b
liuxyctn
fe
irgoyml
rum
lehooik
sgz
i
fuyls
dawdmjf
graryif
srmny
fi
ncgywod
ngjy
neh
x
yd
swgfuul
cyhk
eacdpkm
ycugssl
x
kt
qqidvkd
wbkwf
mqcc
gwwyokq
pc
bu
jzuvcarg
qlacdcgu
c
ircaesd
vzkhzecb
whso
ssaxyuha
strs
jxlhxwo
c
zjqjdeg
wgxub
xqwqjrq
occlaq
eklqbu
fc
eisylx
bvoloe
dii
iacpknf
jatl
xvoxhnv
llv
pdea
xi
zzao
nzjimfh
vfolcz
n
xeace
bpdaofqx
pgd
nk
ipzvtyr
urnuv
kwipyzuo
o
crgp
qztpvnp
v
hkgcc
amhyl
mhqr
hzcl
effzs
pp
xapbei
qraetpl
izui
gy
nfghcywl
yd
cna
ed
zuokcn
kppkweqd
ubjiyily
ybjcg
caz
cmxpd
zcsrfdo
nwi
jgjhhvlp
ppge
v
lask
k
hourdqz
zilirgt
ojww
sr
dskqw
ugloxq
zqhhd
yk
fatewiw
dains
m
k
cknkjfrs
gqvqyxke
ucjxet
wazkmzoy
yhupz
xsaqsx
w
uyesdxh
zgmo
amuzuoqv
qpvghugf
ceq
jqdkr
wfrxsly
boj
ezr
ins
axusv
kzpcnmhe
zsjn
zzse
lsizn
bksvf
gg
itbram
uxgp
fjcfvvq
i
zuh
z
aitkduc
ivzf
rcjagq
bgvjvu
epfirp
cuyea
bboess
vzgsam
mjkrnzy
rnavi
bkjcl
g
qwbpcts
jea
xpvwn
jpjtqkd
or
vx
t
hvt
ldfn
dduzqjki
e
d
xrcxob
hzue
wsabfzek
fdcqlvwj
h
tkhil
rnt
ipoiqvh
gccjfu
cqfey
xixf
tx
mvsdjaw
j
mm
xtstxk
bis
srgokfy
ar
ltardvg
tfmnbj
dk
vkamqqz
paxieibf
gck
vplkqukw
srrug
lh
ch
m
pnut
x
vuuhfl
pj
jaddimq
ts
agm
wiksfn
ahwhua
dkhgp
odb
zvezc
qybas
pfi
ert
pyq
efjvimb
jhgnay
daflpnwo
njvdhlbo
kjaym
ivqvxrj
r
ojbkzuz
rer
ghuss
re
zcxwzqfc
u
txcsu
cl
t
q
mivj
cqceqzdg
hqa
ja
dwffhn
zfempzvr
ovhg
l
dsffs
fvudazl
cmug
miwfl
atqxg
a
jfsan
uqq
diyqegqq
mvayyto
zv
zgeugt
cmayr
yjpea
todv
bq
yryxqf
mnxwqj
qajomy
mgn
jinky
kprh
wkukh
csusvd
heavkqx
ylhxermv
wukrgum
mgcjlkq
mlbcjydw
acyozalt
ezhqjvyl
jxvbmjeq
dtqkv
lkt
xnybohry
rlkalhbz
gpk
lcvg
iqq
nds
t
j
fahp
swetpkib
tevaadsq
ivsy
uk
bktql
osgferhc
l
mnah
a
bupuozhp
ahxox
udulky
x
mk
tqxiut
o
zv
lwhjm
agkwuw
s
re
pawois
kgrkeqv
xgoehwq
smakhrrn
t
zddhol
ypq
rqeh
ngn
ybslj
eywxjva
e
zfopv
ino
m
yzvwcqhn
llyiwwl
azm
oddalqqf
tfdoc
e
vi
jjjh
uufwglmj
mwgec
zh
plywxwe
hph
ucicy
p
xfywney
d
rutrqspx
wmxljzv
zk
l
hjfw
fxsnon
h
ax
qtpngyp
lqonc
ulfsbk
vx
kfnq
ksxfhnmh
q
sefwdbk
ulvjiup
aejhobht
uhswxlqb
nhw
pqkkbu
snhwyqma
in
pfpp
islxz
wrbibc
ixsrvqk
sjsfdjn
y
crsb
bxj
fnhkx
c
dublnkfu
phinpmgh
b
nm
vzyfze
qidr
qbblrsuz
jnot
repd
mdureycu
fleyohl
zf
grwwkxn
orl
w
tagv
q
hwbxdmhe
pnkljulz
b
yeofzqn
mg
v
b
ipb
i
bten
pmatea
uhykxvyd
tfan
ppcygd
kqgcei
kiuesuqp
qspjz
xnhmr
suyelhgr
dcyzisub
orbfbaxy
hkgo
bpi
w
fl
jlu
dqtmg
nll
llfsvmg
pxkf
dmfx
stoyl
krtafh
qsv
qjsra
dfjiuqi
l
gj
ptik
ntlfmjpe
i
vadc
lwctonxu
mlt
ypm
arfj
jgtjbt
f
xeg
svqpve
paa
mue
bqplwkw
digh
kqaf
qujwyy
zc
virw
i
ws
vxpe
xoxztm
pxmox
pb
kkoikz
hrzep
iwozvn
jfkhu
efn
czs
je
bnldu
ucy
d
vwdbimxg
cva
wucfzwho
mikglkoq
l
j
wxl
pqzsxvo
bnxkcg
msczdsq
dess
rffivfau
pvb
uni
jvvn
yfkhl
bfqskx
icdc
uygz
whx
etvzrc
bpccuu
hs
pufrz
rgz
ciljneg
y
bzaedv
ceqctlk
k
esj
wtd
ikoyi
ahcemzcp
tt
edkqnqj
ifs
pcy
bgh
pjfbihqn
k
gpwxdm
dxp
lfaj
brscgcjj
qaatm
zb
ygwgkt
h
bjrok
goqkxzx
bzjnkkr
jxs
jlltro
icpsldi
djutlt
ygoraxp
nafat
ryi
nagskcxv
sgswh
n
ykpszqz
l
tlhoaj
tvzs
xlxpjgn
enhuh
mgkxhfj
wlz
ewsz
pkmfvs
syibs
je
w
fdp
zaxshuk
jcs
hprbhp
kk
wqzs
gvl
xoapv
adf
x
lmv
wma
wbcnc
jiuvn
jpgg
ijum
yxuvo
hober
tvccfw
snijtq
ebsqjqo
leyvs
zl
ughwlfyg
g
nzoraiik
ysmcsh
u
hzc
iban
ih
au
oojyw
xwnm
fty
ehciwkjy
khiuhd
xtlvr
t
vhpdcneg
hrsta
v
xdheij
bv
sdsh
zy
dlg
hnb
jdqesnjz
slvvg
o
oxkp
mtj
fr
ist
ixgyhhsb
pwammma
yqill
gqkq
dknnjtl
dftxvqy
em
qkbyxm
decuehg
xpp
isqbq
tquycdoo
pmthpall
v
ys
ocrissyf
qbosh
h
tvh
khoyo
pofyehpn
knj
elo
ssh
mcp
pzg
nredwf
gwxiikt
qeypy
yg
byvsxchm
lpssza
wkzjdi
kiqi
prgspeko
rader
ztxq
hpalzc
iufj
ysdnwn
cg
flxdks
ajkrkxr
u
ib
uac
pyltct
kevpq
rszdklcd
ye
aqdc
bttomyhl
ogzgw
bvwni
qhz
qbm
ffx
b
lzww
keit
auz
h
bzoavh
hdipcg
rtrnr
awktymp
nwh
xyqsftb
b
oji
fbsw
ssnntact
ycdvatpf
rrp
faukfx
cbzw
npqpkfq
innd
vpwm
h
hdgoblq
lnq
ejp
of
zvrea
w
bcf
ljdakpsm
fea
ppbgx
fu
luj
uk
zhxkkxw
qkdxrdhg
imuntokf
tmgfy
ow
y
qa
bfjsjqyg
nc
gqalc
aiay
ou
no
pzd
kvf
vneipupf
cjqctrdl
xwun
lpb
z
ncubgcq
tyyy
qafhfs
dojq
xfqffp
jjxqlov
ovdzlf
vly
q
viesquzx
ugurwghr
xmsz
z
vmehct
nzxdv
ahs
b
fjv
wtlqs
qxicdrhy
uxuxvt
cldd
knvjlo
cij
h
wlkfjf
jcyevx
idl
nadwo
sqddmk
kxiqhqr
sswnpev
rdisi
gdbygek
du
lmzdg
vypk
tikl
ufwcnb
nikzbn
taitgo
doa
dvypi
lnjocltp
do
skrvskd
vguxw
supb
cqrqt
mib
xzkjrhbd
jaqfxpe
lvvty
nqgrcptu
s
xln
pzjpr
pgujs
ens
akysnp
jfhpetee
fpbwfsf
bz
hmnz
yz
nquwvb
bwrfiy
m
deb
iaa
nnqclp
yfdwcgjd
ckpa
dxlky
s
sjofaq
rbtz
qbo
htet
gc
dnyef
dxctdel
vmrwsha
j
cpapve
zsedzw
x
dceoacc
au
acmj
bkvyq
xihc
dkhgp
kd
ofgpbjpg
zmyl
xbn
muzyz
ff
ssgd
olzpv
vqqk
dwog
ku
lsex
ma
egwoui
mdfjv
vmcr
iapff
z
zbybs
irs
zgsel
bkxqmrs
thcb
dnlel
xrvqjbps
vfy
qxoeqhb
q
lc
yo
lbmeycpb
hxqp
phxd
nknxdskf
it
vu
zuir
bytsnrh
100
omibx
bcpl
twdktxpv
zmq
mj
caey
sgupbvr
ib
geyadpx
pj
sv
pxzv
sne
fijybrz
yf
alcxit
ylfxcfy
dqnh
upl
qfu
fbuhmxgx
ovgvuia
ifjxnnr
blxgh
njz
vwcuq
pwnjfqe
vn
kafpb
m
aqyjpugn
b
osace
uiyrvmcx
tbmhmm
lvrf
eeek
x
wdwqlv
ghmfb
in
vbn
yenbl
ixmfkikh
vejdnx
qer
uogh
e
jgbdo
pvj
fs
ayjdlin
oghiu
squga
hfqhw
qvskwu
hxuqnye
hnov
eqng
wnjdj
wfp
b
rkjnay
hrsu
qb
iow
mkl
vklazudk
ovyqtjxn
tuvuidkh
wrroobz
ctup
kkebgpa
tupoqa
dhabatp
vrf
maotmbxp
nqaimryc
shysjy
anjru
ewbxj
wyljq
tceshwmq
h
vvakgteq
brwk
tkeedr
hys
ueh
ngliivo
afbby
nurxa
cuvk
pym
hcjoo
y
gc
ne
ocbivbk
deqny
AC output:

Code: Select all

0
0
0
0
0
0
0
1 ib ib
0
1 pj pj
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
6 m m
0
7 b b
0
0
0
0
0
6 x x
0
0
1 in in
0
0
0
0
0
0
5 e e
0
0
0
0
0
0
0
0
0
0
0
0
0
7 b b
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8 h h
0
0
0
0
0
0
0
0
0
0
0
3 y y
1 gc gc
0
0
0
Check input and AC output for thousands of problems on uDebug!

User avatar
sbaldrich
New poster
Posts: 3
Joined: Tue Aug 20, 2013 4:49 am

Re: LA-2894 Strange Research

Post by sbaldrich » Fri Sep 13, 2013 7:22 am

@brianfry713: Thanks! I wasn't considering repeated words. Struggled with it for some time :)

Post Reply

Return to “ACM ICPC Archive Board”