QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#234197#39. Love PolygonGMBox100 ✓95ms22488kbC++171.9kb2023-11-01 14:46:562023-11-01 14:47:16

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 21
Accepted

Test #1:

score: 21
Accepted
time: 6ms
memory: 15124kb

input:

20
dqwdlhkyrs faettwvbvz
ymvulechrl mpccwwrdsn
kngwmfcpnu hsyztxtomt
nuobkdfeny pnowootaqk
faettwvbvz ymvulechrl
jnblidnvao dnumkgrmtu
tigdjzmvir kngwmfcpnu
aywoujmlqx jnblidnvao
mpccwwrdsn rpbozfibsk
hcoxgkfnyr hyowdbkmcl
rpbozfibsk higpdaadwg
aeffzovrro dqwdlhkyrs
pnowootaqk ivjjxerjey
ivjjxerjey ...

output:

10

result:

ok single line: '10'

Test #2:

score: 0
Accepted
time: 0ms
memory: 15148kb

input:

20
lkpdvwptvy ufhthvpwfv
njtjekeuzq ufhthvpwfv
uzcqlejjhe ufhthvpwfv
alkvwkyozo ufhthvpwfv
idskcraual ufhthvpwfv
ufanloyufd ufhthvpwfv
lmdckmnikz ufhthvpwfv
sxbofkbpwr ufhthvpwfv
guqjtqfyiu ufhthvpwfv
ufhthvpwfv ufhthvpwfv
kuxbofdejn ufhthvpwfv
alaieqoxak ufhthvpwfv
fpnxqqmsmb ufhthvpwfv
brytwldbky ...

output:

19

result:

ok single line: '19'

Test #3:

score: 0
Accepted
time: 3ms
memory: 15844kb

input:

20
cfzghtgvwi mcgvlvpirf
zikccjhyeq mbhwyyjoig
rwkgbyeopd rwkgbyeopd
xymjfobsks ewedmybdao
wlypoxygbc lunczvcsgn
qtcpvvyifz rwkgbyeopd
mkmrwpxbui mcgvlvpirf
yodrngluha mbhwyyjoig
ycutyefhss ewedmybdao
sxrjidmpov lunczvcsgn
whjpbfvsob mcgvlvpirf
mbhwyyjoig mcgvlvpirf
nqvzxoyfpb lunczvcsgn
agtzatwsbh ...

output:

13

result:

ok single line: '13'

Test #4:

score: 0
Accepted
time: 0ms
memory: 15140kb

input:

8
a b
b e
c d
d f
e f
f g
g e
h g

output:

4

result:

ok single line: '4'

Test #5:

score: 0
Accepted
time: 2ms
memory: 15116kb

input:

3
hubnqtzhnw jmapdnlkdv
qglhpsqelr qglhpsqelr
jmapdnlkdv jmapdnlkdv

output:

-1

result:

ok single line: '-1'

Test #6:

score: 0
Accepted
time: 0ms
memory: 15208kb

input:

19
pllxxxmnbe nwwrdgwlvh
qslzpcdjww tftiyxvxjn
qeydderrzy berhhiiqlo
bvolonbkpw bvolonbkpw
hxpbbsnmwr lxtggsbnuf
cmvbxleszb qbrqqdkqkz
nwwrdgwlvh cwnbruzhax
tftiyxvxjn hlhosdbmdd
sghlsgiwga berhhiiqlo
dzsppvowea hlhosdbmdd
pkrvxfltnn cmvbxleszb
zjlbcruime hdopyvlmbg
cwnbruzhax nbcsvtwgvm
lxtggsbnuf ...

output:

-1

result:

ok single line: '-1'

Test #7:

score: 0
Accepted
time: 2ms
memory: 15184kb

input:

20
lcqmlusoah wiapmtaurm
bvshuopxjt dzbrtfsjgi
pxiiyismts lighiwmljy
pmvtlbewde roschmpleh
roschmpleh pzpsernups
ybjautlevz lcqmlusoah
tqtarousoa owfrrpndfc
jsswdpehrj yrbtnwulvh
mltlfonioo jsswdpehrj
yrbtnwulvh pxiiyismts
owfrrpndfc bvshuopxjt
pzpsernups tqtarousoa
fvuqezaxtv kmgccgeoit
kmgccgeoit ...

output:

11

result:

ok single line: '11'

Test #8:

score: 0
Accepted
time: 7ms
memory: 15188kb

input:

20
lnpvtpzscy mxwegxrfgv
anopovmnvm lhmfhltnjo
qtggvnholq hhmjwetrpr
vxnildyfwj uyiqcoiybg
uyiqcoiybg mxwegxrfgv
ebddqsmcdf lmokqrytah
qiiqmzsgep lmokqrytah
ipdtiwqnar bxxzssqyjb
bxxzssqyjb gzuclwmvhj
dqcfmbtefg ipdtiwqnar
lmokqrytah qtggvnholq
mxwegxrfgv bxxzssqyjb
gzuclwmvhj anopovmnvm
bawbdsvbkc ...

output:

10

result:

ok single line: '10'

Test #9:

score: 0
Accepted
time: 5ms
memory: 15368kb

input:

20
vzgjnahnrb airdbimowh
lqgvqeztry lqgvqeztry
cjdospoydp lciwtzagdq
yhzlndfyis njxkjyfphx
ohnlkgterz xzjbasgqtl
gzjrybmnhb poftukpnmw
ukevntrvis poftukpnmw
poftukpnmw qddflwhtgj
ovtdbwdvkk lciwtzagdq
airdbimowh airdbimowh
cuyiikzhsf ukevntrvis
lciwtzagdq ohnlkgterz
iqigqzijls njxkjyfphx
edimjlzcxa ...

output:

13

result:

ok single line: '13'

Test #10:

score: 0
Accepted
time: 0ms
memory: 15156kb

input:

20
ruqqjctwgx cygivsvjyi
vgbqunysnr uhzcstjigb
daonexvxgg fyizaahxaj
tkavoqkfaa wyerntpfws
cnwzrzrtrc pjoyblmsyu
cemknpgbzg vgbqunysnr
ugscwrjhtv jwfxassnyf
pjoyblmsyu cnwzrzrtrc
jrxvaymwof uhzcstjigb
wyerntpfws asymfkaxuv
uhzcstjigb vgbqunysnr
fyizaahxaj daonexvxgg
ntlhzfgnje pjoyblmsyu
asymfkaxuv ...

output:

9

result:

ok single line: '9'

Test #11:

score: 0
Accepted
time: 2ms
memory: 15144kb

input:

20
txrsnrfnej ozvyqdlsxr
ozvyqdlsxr pgczrkfrhs
stetuxftlz ricyqcrdxt
ztotjewhxv ztotjewhxv
cxzrkgiiao pgczrkfrhs
yqtefevbjv adnmtdwmsa
hubboovuyz pzoawklfzy
smygfhmssb cqpeikqpuk
ricyqcrdxt zbrfyeiwkl
pgczrkfrhs cxzrkgiiao
adnmtdwmsa yqtefevbjv
hxizrrnjox zbrfyeiwkl
fcyvecwnoo hahfvwqhud
cqpeikqpuk ...

output:

10

result:

ok single line: '10'

Test #12:

score: 0
Accepted
time: 0ms
memory: 15136kb

input:

2
pswcjxutfi pswcjxutfi
umklwegufd pswcjxutfi

output:

1

result:

ok single line: '1'

Test #13:

score: 0
Accepted
time: 0ms
memory: 15188kb

input:

4
smufwsdwpn smufwsdwpn
iuisrxwhos jpmsdsgovu
jpmsdsgovu jpmsdsgovu
nrexwhmxxc smufwsdwpn

output:

2

result:

ok single line: '2'

Test #14:

score: 0
Accepted
time: 0ms
memory: 15872kb

input:

6
dlmpavfvxu spmlnvutug
dcbggabqfa dcbggabqfa
fykntcdyiy spmlnvutug
spmlnvutug gyuheqghid
cpwkmezokm dcbggabqfa
gyuheqghid dcbggabqfa

output:

4

result:

ok single line: '4'

Test #15:

score: 0
Accepted
time: 0ms
memory: 15200kb

input:

8
sznluxwysm lxvoxtkvhz
mlybufvdsk lbpegbxnxo
pfvqwndfxx ocysvimbad
lbpegbxnxo sznluxwysm
lxvoxtkvhz sznluxwysm
ocysvimbad lxvoxtkvhz
qltjhcpxjm ocysvimbad
vdyhyqypxv sznluxwysm

output:

4

result:

ok single line: '4'

Subtask #2:

score: 25
Accepted

Test #16:

score: 25
Accepted
time: 2ms
memory: 15520kb

input:

2
brtmorckba brtmorckba
hzfqflfczp hzfqflfczp

output:

2

result:

ok single line: '2'

Test #17:

score: 0
Accepted
time: 5ms
memory: 15244kb

input:

4
vjaqtftnon adllamfood
wyqcsliens ixdxpbqywl
adllamfood vjaqtftnon
ixdxpbqywl wyqcsliens

output:

0

result:

ok single line: '0'

Test #18:

score: 0
Accepted
time: 0ms
memory: 15184kb

input:

6
ktfvywpjup ktfvywpjup
tougwqukic tougwqukic
bcriexqiup bbntpotayn
asqqdrhaut bcriexqiup
nodottwuwp asqqdrhaut
bbntpotayn nodottwuwp

output:

4

result:

ok single line: '4'

Test #19:

score: 0
Accepted
time: 85ms
memory: 22068kb

input:

100000
kgzbaurhcw ieqkdzugxd
zdxapkdjyr ciryujuxea
zyaqfekliw zxiihylife
ygtokuvvau ycfwnpmekw
sfiqaijtop otnyitiyeg
edpgyvetub jskgenvrvm
bmsnfmpsci pzvvrlinut
ykvxjvaqwr wqpshqhljz
uyfsibjfbd nkmfuwojqj
wrvqkoivgn wqrdimjzhb
bgdofpjpiz zoohnreboe
vmvfvetmsa kpedhehqpa
rmwlrafvcx vsmqfjmfih
znyyynz...

output:

50003

result:

ok single line: '50003'

Test #20:

score: 0
Accepted
time: 75ms
memory: 19352kb

input:

100000
sljvuoslhg bhyqlublzg
cfxxvgnnoq ayxbfufakl
myseqyebki eypbrtpjko
mndnwojhmk usimdabrad
vcmqcjborp igeuuswqxh
agylwajluy pcgksmeyjx
nvadtztpyb fhpvnvwqdt
fzvxrbvsjv utdlcrpzoi
qhrhumrufu dfqtvqlyvv
hyxzofkkwx fxbpvicgiz
breijvspxw jrjxiwgjgp
foqtsvcadg zammkqmvly
yrotnpxxrc qzndpgizth
mdntxfn...

output:

53306

result:

ok single line: '53306'

Test #21:

score: 0
Accepted
time: 76ms
memory: 22488kb

input:

100000
mqjejqtaim adynnluflo
tyuqttwunn bxgpxckyuv
cswqvvyviu wrguicwvnh
jsdhzxysmq rixnaqziey
vvrorndcjp yvvkzyvvgw
tlejurlumo brzrgdwmmd
modktlracv icaveptbof
xpztyndoit hwnjewgpko
rpxxxcawkm qjihyslolw
yzaswiwijm ltwvnijrfm
jbbgbjviab loxddiqwta
egsiepumaq kkxrpnqacm
xyetwffbqz spdzrzlduy
dvbjfzu...

output:

50000

result:

ok single line: '50000'

Test #22:

score: 0
Accepted
time: 10ms
memory: 15164kb

input:

99999
bhfudjyvco wzpbznarxh
lwdnazaoan kpkbwqxbfa
kpusnkurzp bpaucbpkfd
pcjwctjtuf sfnmwzveoi
uacvxzutfd rpqsvgnrbo
hnbsnwoyqo yzklbcbidg
dodsdgxozf xjshbafyrk
armalzfzzt mkdlexlmer
fsbdccbfdl vhdgrssoci
nyxnxjpono bnzqopdcir
nlyztlkerf mqhvheymxt
glfanewehr kmxmsdnlnf
xgkvzxpcso cmojrnipzo
huwgbptz...

output:

-1

result:

ok single line: '-1'

Subtask #3:

score: 29
Accepted

Test #23:

score: 29
Accepted
time: 85ms
memory: 18472kb

input:

100000
jochpzryhw kbrhxbvsgu
jfejdndufv ksouutcmzy
binlnitgyw wytuxoixio
hiiynmdoib mvxdjnxqmg
zrvfpttvaa fvaaakyglq
ryxhlcfoqe aswjlllecb
mkpboggifp norydruurd
vcvanmomxs auokoxrbjj
jgnmcqebhk bcknjfemkm
qpbahdmzqn cxfqoudzfg
hxiqyqihmp dqjvhwgldq
tnigwwuiiz qxiukoymms
efpbwtcqfs dxiwctzkux
rajtwbx...

output:

54104

result:

ok single line: '54104'

Test #24:

score: 0
Accepted
time: 84ms
memory: 19284kb

input:

100000
premclilde piioajalxf
gqiofojkli pwazgbqelb
ndshvotfcc mfwjwqiuex
esmgwdcudp ijbjphjrgd
ttztszpeuf vglvajvdor
upklyjvtrk gwopgcjrbw
dnahfgjibx cuikobyyrz
eezohlypve zwfyiqvxux
pcqkoiwczt sljchvuoer
inluvchetb fasxvdnezo
ccfjvojkvo omrvjnahyi
jjqkhrstxs cuneltywfi
ormosppyay pdufkvrolr
hxksepp...

output:

52599

result:

ok single line: '52599'

Test #25:

score: 0
Accepted
time: 76ms
memory: 19368kb

input:

100000
mxnfkndpka mxnfkndpka
befkiimhuj befkiimhuj
pstwmezoom pstwmezoom
ektrbepuph ektrbepuph
wkqgnvlfae wkqgnvlfae
uozzkndlfz uozzkndlfz
pifyegpnzp pifyegpnzp
vnkjgrzlqc vnkjgrzlqc
odbsgjvfvv odbsgjvfvv
vwkdgusanu vwkdgusanu
gqfregemgn gqfregemgn
fwwdvxdvuo fwwdvxdvuo
vllhjleilq vllhjleilq
dqptjvo...

output:

100000

result:

ok single line: '100000'

Test #26:

score: 0
Accepted
time: 6ms
memory: 15140kb

input:

99999
iznbcngerd kadaaspukk
qpnvkyowde eetlzhwurd
npujpfanmv vbquidexdc
ortcyyhudv bkaydlnukr
ltakxwacjy wkowcnhktq
hjhrfkwfue cuqeqpsixp
wtalkpowrh mnajmxznik
awopbocnrx zxfjmdolbw
vhqyhauqmf tzvbmngoem
nhsdzmvezc pwfgjqvnkc
mibkekabqy vpsfyuqdlf
abgtskkznm pinqlvidhy
zswkzxpqkg yopwtvubcx
osjasktf...

output:

-1

result:

ok single line: '-1'

Test #27:

score: 0
Accepted
time: 93ms
memory: 21764kb

input:

100000
hprqzitoag hqbsudxwul
uakbdzseru zpcavkevwy
nbcbljqtxx iblrjbwyyd
lafsuvprov iqbcxxdazv
uykmuzqmyv kryqftdxva
grkygjmjom gpsakgdwfj
krbnjfebkv kfuupyhbpo
dezlcwtajp araohvesxr
qoeqjtepfu zivtrpukqe
khdgbgyexo xqmkfbkzne
owjwobmgjl sysphaoaww
gppksffkpr qmcflvjbar
dmhwwgjixk uylftryfnm
mporqnq...

output:

50001

result:

ok single line: '50001'

Test #28:

score: 0
Accepted
time: 82ms
memory: 17684kb

input:

100000
qyfanbydbw ndydcymytz
eokglekpcr jwjoapgcav
ezfszcaymn cyumqhilaw
fkydjuindh ttuhiqzxvl
oqzioduozo amziyotnhi
qmxyuibikb chgmfsktua
hjigpdrgvu emqzxyaeri
gintgsglvi lxuydpcxkn
yenwcdjddu xbdmdkdzfm
opldcocwba pftqyilghg
igfylvdxxt fzayuoiocg
jtctiggcsp yfjlxodpwk
qdpzliyzki oaarrjyzyt
nirmfrc...

output:

59657

result:

ok single line: '59657'

Test #29:

score: 0
Accepted
time: 87ms
memory: 17740kb

input:

100000
dddhcldgfe fjjzdyanxu
usszczwwco hjecwqrynw
iciawwpecs qbrqjnzkgk
hduascinvz fmiqqwzmjv
dtmzeupjyd hvgyagqagf
bnzvpkgzwq bhbhxyzbhs
ugdilmsnit bjzzsygrpd
ygkpbjembd knglscjnvj
gnkuthzzfn djukcpncjn
cqoecuvkov vzmsppvqyn
fkmadjwdmr ibnfqfczex
dugbmtpesi yrfzzhbgmn
ngvslipsgs nlushtfyuj
kagsfgb...

output:

59677

result:

ok single line: '59677'

Test #30:

score: 0
Accepted
time: 74ms
memory: 18092kb

input:

100000
joikcxbxcv hmevblxonf
wulmwuhxxg mdtxfjffpr
dykuwucesb uletkxzoxb
thqtmynntc thqtmynntc
jximclslvi jximclslvi
dxewjvvamq dxewjvvamq
ezgqzlilys nzyvnvoegf
ekcbdjlqjq ekcbdjlqjq
zoydfayhhx mfuecphdfg
bcxfxxwhsr bcxfxxwhsr
acwxadnxpd xjnflhpzup
kuqxgieawc kuqxgieawc
wfxcylhtcd jjrehocsmp
bcotxpe...

output:

68624

result:

ok single line: '68624'

Test #31:

score: 0
Accepted
time: 75ms
memory: 17212kb

input:

100000
tqvsigxscz wyplypbzcf
rkbbadvhjr fbjwwhjcqs
ckdzxrqozl ntuswyfawo
sonjwoaija hmtxtsnkbg
qdacpjvyne wdogbuvxue
esetuxzphx gftxvlodka
ypvtbaflki xuradbxluu
oowzqmfsvl uwsolhtsov
jrwfzdegfn anyqrbcmsh
jpxpovjjfs wdsjsjvpnr
rprcrmgrpg btnhteswbw
pmcqlfkjyp wmjjvsckrm
wrpgggzamn tjbztnukpq
hilfloj...

output:

74881

result:

ok single line: '74881'

Test #32:

score: 0
Accepted
time: 56ms
memory: 16140kb

input:

100000
nijixamduf ntjsxlrlfo
weyiplvznc ntjsxlrlfo
aoylpmltxn ntjsxlrlfo
yjbsndvncc ntjsxlrlfo
jrpswwjrka ntjsxlrlfo
xyiedhiyzr ntjsxlrlfo
nltoxmciam ntjsxlrlfo
fawzagvbks ntjsxlrlfo
gblsqxuflk ntjsxlrlfo
skoomllycu ntjsxlrlfo
dakrzcnfoc ntjsxlrlfo
ezfoztgvjn ntjsxlrlfo
ghctlbqxad ntjsxlrlfo
xaudiha...

output:

99999

result:

ok single line: '99999'

Test #33:

score: 0
Accepted
time: 0ms
memory: 15192kb

input:

16
vpkcqkwhzt vpkcqkwhzt
jpcrutlrcy qrklavwalk
wqjvsdoxvz vpkcqkwhzt
yaxphfdere gsikvxfuek
esprdjgwaj qrklavwalk
dlamkiynfr gsikvxfuek
siwoapddts esprdjgwaj
ekhiornbck vpkcqkwhzt
jgenmjpqow vkjuopatji
gsikvxfuek wqjvsdoxvz
wmqrnidbnr wqjvsdoxvz
hxywnpcyqv vpkcqkwhzt
yzpkysvwjl gsikvxfuek
vkjuopatji ...

output:

10

result:

ok single line: '10'

Test #34:

score: 0
Accepted
time: 2ms
memory: 15204kb

input:

10
wkpswjrudm zavdsirfix
zavdsirfix zavdsirfix
vofxpsabfy vofxpsabfy
gvjzdjiplo wkpswjrudm
rehkwduhrk vofxpsabfy
mwjlgfllav vofxpsabfy
gjxnglnxxb gvjzdjiplo
wjpqekkryk gvjzdjiplo
izhybiwcwx zavdsirfix
gihjihvgbu zavdsirfix

output:

7

result:

ok single line: '7'

Test #35:

score: 0
Accepted
time: 2ms
memory: 15208kb

input:

10
qcdpidyahe nmzrrdeudo
nmzrrdeudo nmzrrdeudo
uygynrnowi zslpqsliix
owwgbhslco qcdpidyahe
cuvybdegvh dnpxoqgfdm
gsxdxsnqwp nmzrrdeudo
nuzrjpojjq zhbrznzeii
dnpxoqgfdm dnpxoqgfdm
zslpqsliix zslpqsliix
zhbrznzeii dnpxoqgfdm

output:

5

result:

ok single line: '5'

Test #36:

score: 0
Accepted
time: 0ms
memory: 15140kb

input:

16
ynxapqsoex ynxapqsoex
vnfmqirwqz ynxapqsoex
veswanjrbr bqxzldlyxa
frdyfzrxjp frdyfzrxjp
xumvexwsrb sjthyufkvr
ijqsvqawtd sjthyufkvr
sjthyufkvr sjthyufkvr
fwqgcshhzb xumvexwsrb
dhyjbjjrdd sjthyufkvr
bqxzldlyxa ijqsvqawtd
pcnzbzvowb qtkxushoks
gxpzenslva kxhuzncmix
jbwoqiimik qtkxushoks
kxhuzncmix ...

output:

10

result:

ok single line: '10'

Subtask #4:

score: 25
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Test #37:

score: 25
Accepted
time: 82ms
memory: 18820kb

input:

100000
zjwwfwzvuz cyiqdlzjhs
obxlyllokv zsqsodkule
yinwgpcjod qrhzfkddgn
jmqdqxdrup logfuqelth
rajzsntreq locumfeuxp
xmfgwytgth qwqcwbrvvl
fvgbyqmoyx pptmjfmebn
rmkeogtaxb pcghqvvnhv
cbokkwzujp xpkpwmgndn
kvpzawphww xwzzknztdp
wdpjvhtfnu zmhrkqbbga
oytnwycrwm gmcaspkpph
nhydefbnho juuttlvixi
vifbjuu...

output:

51898

result:

ok single line: '51898'

Test #38:

score: 0
Accepted
time: 81ms
memory: 18468kb

input:

100000
gxpnxybmjc ibdiymbutz
ebtsnlyebw fzprvdllne
nvrzbtikau exeffoclwl
borbybijpt kgmwugdyxe
fbcsvnlyvd aryjwbvrxi
wtypfrdjpf ynfxnsduig
attgtijgxi drgjzqyunq
vcuvkurjsr fcjsuidpkc
wyoogffmge dsjlpideut
ynhpargmys vqzqzvvyuv
tkhvxttudc zlnpytscpd
qzjwosugay ultodthdme
vopmmdclvo sebqwoeofl
mlenrjk...

output:

58945

result:

ok single line: '58945'

Test #39:

score: 0
Accepted
time: 85ms
memory: 17804kb

input:

100000
nduqubjoul kkkantqcgi
viswmpdfoy pskilxqhqy
jxteadanxc tiaowbsqcu
txetaztftb oouplotlap
otvinkeufn hqqwiwqcpt
fpgmlbqqav uubpktnzkk
wregotpohq jlhnkwpcdb
swigptqzof mjkhmrxlra
ttrehfunpt irxcjhifem
wvjbcxziey vqbqvwlpfe
svlcjtinsw wikmyuamrj
jacxtyojmp npirfbylci
mmfsbxyppd vairsnkzmb
oiudwsp...

output:

58583

result:

ok single line: '58583'

Test #40:

score: 0
Accepted
time: 73ms
memory: 17612kb

input:

100000
xsewdibqkg anfnxamzvl
iteoovmcnm ubvimxfzvb
gzxbvwpvvk dcgtllzgbl
jpvmqicofb ccylnbkcym
lawdkabcal ixevkchzty
nwzsemoitd yagvqdbllh
jpbptzdpet rvpudqzrlg
mazphnldmg jjdhjlorgk
dskuollvrh randfoumxz
olwucljezu ykkqjrvxyf
pbdsysidmx waifymcyti
snuvuxdkce gnpckiydpd
uwmniyjvol ziudatehya
gwumbnt...

output:

59681

result:

ok single line: '59681'

Test #41:

score: 0
Accepted
time: 80ms
memory: 17724kb

input:

100000
rvtslsqnpm duwpnougjj
yovxuethyj lmdzhnlymq
qtzmduanot hgjowlsfut
vompkxavfh wtperctomn
yuipfhmqea cxatxiktsg
niyrbhattr eclvnpswoe
kaagdyzbok illfxbajws
ggejyrlbxc cysgkyualh
nkvgcbjgko cyspokbrki
stdouisogm ekndvgzsql
nkbkjqinpe wvixdlgwih
nsssikddkp qwevtsxdnv
kjafdhgayn kaxxtrksjx
fldgflr...

output:

59689

result:

ok single line: '59689'

Test #42:

score: 0
Accepted
time: 81ms
memory: 17996kb

input:

100000
psiqdswllm ecywqphkri
hyvccfyyio erydchkuxp
yisuzeyasx npycbvnono
hytldokbfl seaazwjpie
ckkhvhpdsk eqxmkqtdvy
twoozzvptn mhmtfnnryn
wnxrarwkmm cgyptroyxb
axhrqfclhy arafprswen
skbbslqztr fdapqlzdsp
snwzwdxajj ztecgrxufe
ydstlozafw yreufqzlyr
loiouawfra ovgcwprpkg
zrhwkddyzy wuxpxqwaho
hawninu...

output:

56779

result:

ok single line: '56779'

Test #43:

score: 0
Accepted
time: 81ms
memory: 18004kb

input:

100000
yhsnbyoamm zozzjtcdps
zqhnzpphgj awcigsmtxx
palbnmigde vgjtbyhmxr
knwyeygdlh hiqudkdtna
jkkzkcgkgi foivydnobv
iaiwxridaa eowyqqvdmv
lgzbasswxj biskgfzmpl
ougczmoftf jmglsmkvwj
rekyymkyxf arfmuevbwj
ufisgngmaw fvghgefbzp
kwdilfljae xgerfdxisy
swogqowpyk xzweujbnpt
awbpmmhuwv rvhocunlho
usjkyjg...

output:

56653

result:

ok single line: '56653'

Test #44:

score: 0
Accepted
time: 80ms
memory: 18088kb

input:

100000
magmzfjxyc jcggriyejg
oqkbtkhcya cmqbokqzry
uhilikoswh gaocmbpkac
wskqyphwpw vylfoxgrur
skbyyhotpa dmryqxrzvc
ucdjnvpkeh binfsnrzaa
cxrgwieoim tbwjxirhra
jabpknqdak dzemukvteq
bmajtjtkut rchzvjbveu
cbapllfjnc udcamknujg
unklqbgolc hawoqphcfx
srwxovmsxb ynaespoaqo
wiupmkjedg filaasyjiw
mnijvco...

output:

56631

result:

ok single line: '56631'

Test #45:

score: 0
Accepted
time: 85ms
memory: 18004kb

input:

100000
fhqikazvkg gwdfznbwwh
wvpqlcarhg qwqiwqszvq
sgbwfprcnx nmumeeriow
aqbgljtzfv yhumglncje
rbtmiusqgu tejwyubtnw
qyyovmrbwu fxnzcezijc
lbujouihvr hplnevhkzf
blpupiphze hmhfsomfam
quzmjymtuf ttmivgupsm
nqgguzebcc ewxdzlsmof
tayssitngp cljbtfnfux
aknhcgnrot vtbeoteago
yxtmxqdxks ffsrzjlibp
ofdkxod...

output:

56721

result:

ok single line: '56721'

Test #46:

score: 0
Accepted
time: 84ms
memory: 17992kb

input:

100000
mskxoxuzcw ugdvsvxgom
hjsfmamauc ohbzvixfsc
faqssowcht fjcqhsyftd
irsptbavry fcyskhnezx
dtlywqnold ixdvalbxrx
zrcenthhpf lkxzogjenm
nykalepwbg dcembzwjqh
hofizjkxed ntrfdyfoke
mfzbhjfgfd rfqugoaplz
ppospabmwu iydzqzveqv
gfkcpglljb ljystkkehq
gpwkjjngil vtrkmorqfr
adibtbpfmc byckjqeepq
ximvjzm...

output:

56733

result:

ok single line: '56733'

Test #47:

score: 0
Accepted
time: 77ms
memory: 17168kb

input:

100000
vcuospoqnz fiixczhyfv
gtysycwaap cqkkpvesup
youbzdkpde yzbzfhmpnn
yvfxssckzm ehdyitboug
msynxzcsyb rwcceqkmqe
prvutvouxu jlthasqvyt
txujrchxch uffifaoych
fywppfovqq mhkkzdtooz
phopuoesgm ifojzraiqr
gehuuzxrpt dmkqoczvab
mqftjhftgq alsnwsrrbj
veswzckdfn ftkupgpnxa
grwxnxtttz cskhwvitlw
yrhbqse...

output:

74864

result:

ok single line: '74864'

Test #48:

score: 0
Accepted
time: 87ms
memory: 18468kb

input:

100000
jochpzryhw kbrhxbvsgu
jfejdndufv ksouutcmzy
binlnitgyw wytuxoixio
hiiynmdoib mvxdjnxqmg
zrvfpttvaa fvaaakyglq
ryxhlcfoqe aswjlllecb
mkpboggifp norydruurd
vcvanmomxs auokoxrbjj
jgnmcqebhk bcknjfemkm
qpbahdmzqn cxfqoudzfg
hxiqyqihmp dqjvhwgldq
tnigwwuiiz qxiukoymms
efpbwtcqfs dxiwctzkux
rajtwbx...

output:

54104

result:

ok single line: '54104'

Test #49:

score: 0
Accepted
time: 87ms
memory: 19360kb

input:

100000
premclilde piioajalxf
gqiofojkli pwazgbqelb
ndshvotfcc mfwjwqiuex
esmgwdcudp ijbjphjrgd
ttztszpeuf vglvajvdor
upklyjvtrk gwopgcjrbw
dnahfgjibx cuikobyyrz
eezohlypve zwfyiqvxux
pcqkoiwczt sljchvuoer
inluvchetb fasxvdnezo
ccfjvojkvo omrvjnahyi
jjqkhrstxs cuneltywfi
ormosppyay pdufkvrolr
hxksepp...

output:

52599

result:

ok single line: '52599'

Test #50:

score: 0
Accepted
time: 73ms
memory: 19308kb

input:

100000
mxnfkndpka mxnfkndpka
befkiimhuj befkiimhuj
pstwmezoom pstwmezoom
ektrbepuph ektrbepuph
wkqgnvlfae wkqgnvlfae
uozzkndlfz uozzkndlfz
pifyegpnzp pifyegpnzp
vnkjgrzlqc vnkjgrzlqc
odbsgjvfvv odbsgjvfvv
vwkdgusanu vwkdgusanu
gqfregemgn gqfregemgn
fwwdvxdvuo fwwdvxdvuo
vllhjleilq vllhjleilq
dqptjvo...

output:

100000

result:

ok single line: '100000'

Test #51:

score: 0
Accepted
time: 9ms
memory: 15128kb

input:

99999
iznbcngerd kadaaspukk
qpnvkyowde eetlzhwurd
npujpfanmv vbquidexdc
ortcyyhudv bkaydlnukr
ltakxwacjy wkowcnhktq
hjhrfkwfue cuqeqpsixp
wtalkpowrh mnajmxznik
awopbocnrx zxfjmdolbw
vhqyhauqmf tzvbmngoem
nhsdzmvezc pwfgjqvnkc
mibkekabqy vpsfyuqdlf
abgtskkznm pinqlvidhy
zswkzxpqkg yopwtvubcx
osjasktf...

output:

-1

result:

ok single line: '-1'

Test #52:

score: 0
Accepted
time: 95ms
memory: 21664kb

input:

100000
hprqzitoag hqbsudxwul
uakbdzseru zpcavkevwy
nbcbljqtxx iblrjbwyyd
lafsuvprov iqbcxxdazv
uykmuzqmyv kryqftdxva
grkygjmjom gpsakgdwfj
krbnjfebkv kfuupyhbpo
dezlcwtajp araohvesxr
qoeqjtepfu zivtrpukqe
khdgbgyexo xqmkfbkzne
owjwobmgjl sysphaoaww
gppksffkpr qmcflvjbar
dmhwwgjixk uylftryfnm
mporqnq...

output:

50001

result:

ok single line: '50001'

Test #53:

score: 0
Accepted
time: 81ms
memory: 17728kb

input:

100000
qyfanbydbw ndydcymytz
eokglekpcr jwjoapgcav
ezfszcaymn cyumqhilaw
fkydjuindh ttuhiqzxvl
oqzioduozo amziyotnhi
qmxyuibikb chgmfsktua
hjigpdrgvu emqzxyaeri
gintgsglvi lxuydpcxkn
yenwcdjddu xbdmdkdzfm
opldcocwba pftqyilghg
igfylvdxxt fzayuoiocg
jtctiggcsp yfjlxodpwk
qdpzliyzki oaarrjyzyt
nirmfrc...

output:

59657

result:

ok single line: '59657'

Test #54:

score: 0
Accepted
time: 75ms
memory: 17656kb

input:

100000
dddhcldgfe fjjzdyanxu
usszczwwco hjecwqrynw
iciawwpecs qbrqjnzkgk
hduascinvz fmiqqwzmjv
dtmzeupjyd hvgyagqagf
bnzvpkgzwq bhbhxyzbhs
ugdilmsnit bjzzsygrpd
ygkpbjembd knglscjnvj
gnkuthzzfn djukcpncjn
cqoecuvkov vzmsppvqyn
fkmadjwdmr ibnfqfczex
dugbmtpesi yrfzzhbgmn
ngvslipsgs nlushtfyuj
kagsfgb...

output:

59677

result:

ok single line: '59677'

Test #55:

score: 0
Accepted
time: 84ms
memory: 18084kb

input:

100000
joikcxbxcv hmevblxonf
wulmwuhxxg mdtxfjffpr
dykuwucesb uletkxzoxb
thqtmynntc thqtmynntc
jximclslvi jximclslvi
dxewjvvamq dxewjvvamq
ezgqzlilys nzyvnvoegf
ekcbdjlqjq ekcbdjlqjq
zoydfayhhx mfuecphdfg
bcxfxxwhsr bcxfxxwhsr
acwxadnxpd xjnflhpzup
kuqxgieawc kuqxgieawc
wfxcylhtcd jjrehocsmp
bcotxpe...

output:

68624

result:

ok single line: '68624'

Test #56:

score: 0
Accepted
time: 72ms
memory: 17060kb

input:

100000
tqvsigxscz wyplypbzcf
rkbbadvhjr fbjwwhjcqs
ckdzxrqozl ntuswyfawo
sonjwoaija hmtxtsnkbg
qdacpjvyne wdogbuvxue
esetuxzphx gftxvlodka
ypvtbaflki xuradbxluu
oowzqmfsvl uwsolhtsov
jrwfzdegfn anyqrbcmsh
jpxpovjjfs wdsjsjvpnr
rprcrmgrpg btnhteswbw
pmcqlfkjyp wmjjvsckrm
wrpgggzamn tjbztnukpq
hilfloj...

output:

74881

result:

ok single line: '74881'

Test #57:

score: 0
Accepted
time: 55ms
memory: 16232kb

input:

100000
nijixamduf ntjsxlrlfo
weyiplvznc ntjsxlrlfo
aoylpmltxn ntjsxlrlfo
yjbsndvncc ntjsxlrlfo
jrpswwjrka ntjsxlrlfo
xyiedhiyzr ntjsxlrlfo
nltoxmciam ntjsxlrlfo
fawzagvbks ntjsxlrlfo
gblsqxuflk ntjsxlrlfo
skoomllycu ntjsxlrlfo
dakrzcnfoc ntjsxlrlfo
ezfoztgvjn ntjsxlrlfo
ghctlbqxad ntjsxlrlfo
xaudiha...

output:

99999

result:

ok single line: '99999'

Test #58:

score: 0
Accepted
time: 2ms
memory: 15148kb

input:

16
vpkcqkwhzt vpkcqkwhzt
jpcrutlrcy qrklavwalk
wqjvsdoxvz vpkcqkwhzt
yaxphfdere gsikvxfuek
esprdjgwaj qrklavwalk
dlamkiynfr gsikvxfuek
siwoapddts esprdjgwaj
ekhiornbck vpkcqkwhzt
jgenmjpqow vkjuopatji
gsikvxfuek wqjvsdoxvz
wmqrnidbnr wqjvsdoxvz
hxywnpcyqv vpkcqkwhzt
yzpkysvwjl gsikvxfuek
vkjuopatji ...

output:

10

result:

ok single line: '10'

Test #59:

score: 0
Accepted
time: 0ms
memory: 15132kb

input:

10
wkpswjrudm zavdsirfix
zavdsirfix zavdsirfix
vofxpsabfy vofxpsabfy
gvjzdjiplo wkpswjrudm
rehkwduhrk vofxpsabfy
mwjlgfllav vofxpsabfy
gjxnglnxxb gvjzdjiplo
wjpqekkryk gvjzdjiplo
izhybiwcwx zavdsirfix
gihjihvgbu zavdsirfix

output:

7

result:

ok single line: '7'

Test #60:

score: 0
Accepted
time: 3ms
memory: 15196kb

input:

10
qcdpidyahe nmzrrdeudo
nmzrrdeudo nmzrrdeudo
uygynrnowi zslpqsliix
owwgbhslco qcdpidyahe
cuvybdegvh dnpxoqgfdm
gsxdxsnqwp nmzrrdeudo
nuzrjpojjq zhbrznzeii
dnpxoqgfdm dnpxoqgfdm
zslpqsliix zslpqsliix
zhbrznzeii dnpxoqgfdm

output:

5

result:

ok single line: '5'

Test #61:

score: 0
Accepted
time: 2ms
memory: 15148kb

input:

16
ynxapqsoex ynxapqsoex
vnfmqirwqz ynxapqsoex
veswanjrbr bqxzldlyxa
frdyfzrxjp frdyfzrxjp
xumvexwsrb sjthyufkvr
ijqsvqawtd sjthyufkvr
sjthyufkvr sjthyufkvr
fwqgcshhzb xumvexwsrb
dhyjbjjrdd sjthyufkvr
bqxzldlyxa ijqsvqawtd
pcnzbzvowb qtkxushoks
gxpzenslva kxhuzncmix
jbwoqiimik qtkxushoks
kxhuzncmix ...

output:

10

result:

ok single line: '10'

Test #62:

score: 0
Accepted
time: 0ms
memory: 15208kb

input:

2
brtmorckba brtmorckba
hzfqflfczp hzfqflfczp

output:

2

result:

ok single line: '2'

Test #63:

score: 0
Accepted
time: 3ms
memory: 15392kb

input:

4
vjaqtftnon adllamfood
wyqcsliens ixdxpbqywl
adllamfood vjaqtftnon
ixdxpbqywl wyqcsliens

output:

0

result:

ok single line: '0'

Test #64:

score: 0
Accepted
time: 2ms
memory: 15200kb

input:

6
ktfvywpjup ktfvywpjup
tougwqukic tougwqukic
bcriexqiup bbntpotayn
asqqdrhaut bcriexqiup
nodottwuwp asqqdrhaut
bbntpotayn nodottwuwp

output:

4

result:

ok single line: '4'

Test #65:

score: 0
Accepted
time: 88ms
memory: 22048kb

input:

100000
kgzbaurhcw ieqkdzugxd
zdxapkdjyr ciryujuxea
zyaqfekliw zxiihylife
ygtokuvvau ycfwnpmekw
sfiqaijtop otnyitiyeg
edpgyvetub jskgenvrvm
bmsnfmpsci pzvvrlinut
ykvxjvaqwr wqpshqhljz
uyfsibjfbd nkmfuwojqj
wrvqkoivgn wqrdimjzhb
bgdofpjpiz zoohnreboe
vmvfvetmsa kpedhehqpa
rmwlrafvcx vsmqfjmfih
znyyynz...

output:

50003

result:

ok single line: '50003'

Test #66:

score: 0
Accepted
time: 86ms
memory: 19256kb

input:

100000
sljvuoslhg bhyqlublzg
cfxxvgnnoq ayxbfufakl
myseqyebki eypbrtpjko
mndnwojhmk usimdabrad
vcmqcjborp igeuuswqxh
agylwajluy pcgksmeyjx
nvadtztpyb fhpvnvwqdt
fzvxrbvsjv utdlcrpzoi
qhrhumrufu dfqtvqlyvv
hyxzofkkwx fxbpvicgiz
breijvspxw jrjxiwgjgp
foqtsvcadg zammkqmvly
yrotnpxxrc qzndpgizth
mdntxfn...

output:

53306

result:

ok single line: '53306'

Test #67:

score: 0
Accepted
time: 88ms
memory: 22400kb

input:

100000
mqjejqtaim adynnluflo
tyuqttwunn bxgpxckyuv
cswqvvyviu wrguicwvnh
jsdhzxysmq rixnaqziey
vvrorndcjp yvvkzyvvgw
tlejurlumo brzrgdwmmd
modktlracv icaveptbof
xpztyndoit hwnjewgpko
rpxxxcawkm qjihyslolw
yzaswiwijm ltwvnijrfm
jbbgbjviab loxddiqwta
egsiepumaq kkxrpnqacm
xyetwffbqz spdzrzlduy
dvbjfzu...

output:

50000

result:

ok single line: '50000'

Test #68:

score: 0
Accepted
time: 10ms
memory: 15980kb

input:

99999
bhfudjyvco wzpbznarxh
lwdnazaoan kpkbwqxbfa
kpusnkurzp bpaucbpkfd
pcjwctjtuf sfnmwzveoi
uacvxzutfd rpqsvgnrbo
hnbsnwoyqo yzklbcbidg
dodsdgxozf xjshbafyrk
armalzfzzt mkdlexlmer
fsbdccbfdl vhdgrssoci
nyxnxjpono bnzqopdcir
nlyztlkerf mqhvheymxt
glfanewehr kmxmsdnlnf
xgkvzxpcso cmojrnipzo
huwgbptz...

output:

-1

result:

ok single line: '-1'

Test #69:

score: 0
Accepted
time: 0ms
memory: 15972kb

input:

20
dqwdlhkyrs faettwvbvz
ymvulechrl mpccwwrdsn
kngwmfcpnu hsyztxtomt
nuobkdfeny pnowootaqk
faettwvbvz ymvulechrl
jnblidnvao dnumkgrmtu
tigdjzmvir kngwmfcpnu
aywoujmlqx jnblidnvao
mpccwwrdsn rpbozfibsk
hcoxgkfnyr hyowdbkmcl
rpbozfibsk higpdaadwg
aeffzovrro dqwdlhkyrs
pnowootaqk ivjjxerjey
ivjjxerjey ...

output:

10

result:

ok single line: '10'

Test #70:

score: 0
Accepted
time: 0ms
memory: 15780kb

input:

20
lkpdvwptvy ufhthvpwfv
njtjekeuzq ufhthvpwfv
uzcqlejjhe ufhthvpwfv
alkvwkyozo ufhthvpwfv
idskcraual ufhthvpwfv
ufanloyufd ufhthvpwfv
lmdckmnikz ufhthvpwfv
sxbofkbpwr ufhthvpwfv
guqjtqfyiu ufhthvpwfv
ufhthvpwfv ufhthvpwfv
kuxbofdejn ufhthvpwfv
alaieqoxak ufhthvpwfv
fpnxqqmsmb ufhthvpwfv
brytwldbky ...

output:

19

result:

ok single line: '19'

Test #71:

score: 0
Accepted
time: 0ms
memory: 16036kb

input:

20
cfzghtgvwi mcgvlvpirf
zikccjhyeq mbhwyyjoig
rwkgbyeopd rwkgbyeopd
xymjfobsks ewedmybdao
wlypoxygbc lunczvcsgn
qtcpvvyifz rwkgbyeopd
mkmrwpxbui mcgvlvpirf
yodrngluha mbhwyyjoig
ycutyefhss ewedmybdao
sxrjidmpov lunczvcsgn
whjpbfvsob mcgvlvpirf
mbhwyyjoig mcgvlvpirf
nqvzxoyfpb lunczvcsgn
agtzatwsbh ...

output:

13

result:

ok single line: '13'

Test #72:

score: 0
Accepted
time: 0ms
memory: 15124kb

input:

8
a b
b e
c d
d f
e f
f g
g e
h g

output:

4

result:

ok single line: '4'

Test #73:

score: 0
Accepted
time: 0ms
memory: 15244kb

input:

3
hubnqtzhnw jmapdnlkdv
qglhpsqelr qglhpsqelr
jmapdnlkdv jmapdnlkdv

output:

-1

result:

ok single line: '-1'

Test #74:

score: 0
Accepted
time: 5ms
memory: 15484kb

input:

19
pllxxxmnbe nwwrdgwlvh
qslzpcdjww tftiyxvxjn
qeydderrzy berhhiiqlo
bvolonbkpw bvolonbkpw
hxpbbsnmwr lxtggsbnuf
cmvbxleszb qbrqqdkqkz
nwwrdgwlvh cwnbruzhax
tftiyxvxjn hlhosdbmdd
sghlsgiwga berhhiiqlo
dzsppvowea hlhosdbmdd
pkrvxfltnn cmvbxleszb
zjlbcruime hdopyvlmbg
cwnbruzhax nbcsvtwgvm
lxtggsbnuf ...

output:

-1

result:

ok single line: '-1'

Test #75:

score: 0
Accepted
time: 0ms
memory: 15204kb

input:

20
lcqmlusoah wiapmtaurm
bvshuopxjt dzbrtfsjgi
pxiiyismts lighiwmljy
pmvtlbewde roschmpleh
roschmpleh pzpsernups
ybjautlevz lcqmlusoah
tqtarousoa owfrrpndfc
jsswdpehrj yrbtnwulvh
mltlfonioo jsswdpehrj
yrbtnwulvh pxiiyismts
owfrrpndfc bvshuopxjt
pzpsernups tqtarousoa
fvuqezaxtv kmgccgeoit
kmgccgeoit ...

output:

11

result:

ok single line: '11'

Test #76:

score: 0
Accepted
time: 5ms
memory: 15156kb

input:

20
lnpvtpzscy mxwegxrfgv
anopovmnvm lhmfhltnjo
qtggvnholq hhmjwetrpr
vxnildyfwj uyiqcoiybg
uyiqcoiybg mxwegxrfgv
ebddqsmcdf lmokqrytah
qiiqmzsgep lmokqrytah
ipdtiwqnar bxxzssqyjb
bxxzssqyjb gzuclwmvhj
dqcfmbtefg ipdtiwqnar
lmokqrytah qtggvnholq
mxwegxrfgv bxxzssqyjb
gzuclwmvhj anopovmnvm
bawbdsvbkc ...

output:

10

result:

ok single line: '10'

Test #77:

score: 0
Accepted
time: 0ms
memory: 15124kb

input:

20
vzgjnahnrb airdbimowh
lqgvqeztry lqgvqeztry
cjdospoydp lciwtzagdq
yhzlndfyis njxkjyfphx
ohnlkgterz xzjbasgqtl
gzjrybmnhb poftukpnmw
ukevntrvis poftukpnmw
poftukpnmw qddflwhtgj
ovtdbwdvkk lciwtzagdq
airdbimowh airdbimowh
cuyiikzhsf ukevntrvis
lciwtzagdq ohnlkgterz
iqigqzijls njxkjyfphx
edimjlzcxa ...

output:

13

result:

ok single line: '13'

Test #78:

score: 0
Accepted
time: 2ms
memory: 15244kb

input:

20
ruqqjctwgx cygivsvjyi
vgbqunysnr uhzcstjigb
daonexvxgg fyizaahxaj
tkavoqkfaa wyerntpfws
cnwzrzrtrc pjoyblmsyu
cemknpgbzg vgbqunysnr
ugscwrjhtv jwfxassnyf
pjoyblmsyu cnwzrzrtrc
jrxvaymwof uhzcstjigb
wyerntpfws asymfkaxuv
uhzcstjigb vgbqunysnr
fyizaahxaj daonexvxgg
ntlhzfgnje pjoyblmsyu
asymfkaxuv ...

output:

9

result:

ok single line: '9'

Test #79:

score: 0
Accepted
time: 0ms
memory: 15192kb

input:

20
txrsnrfnej ozvyqdlsxr
ozvyqdlsxr pgczrkfrhs
stetuxftlz ricyqcrdxt
ztotjewhxv ztotjewhxv
cxzrkgiiao pgczrkfrhs
yqtefevbjv adnmtdwmsa
hubboovuyz pzoawklfzy
smygfhmssb cqpeikqpuk
ricyqcrdxt zbrfyeiwkl
pgczrkfrhs cxzrkgiiao
adnmtdwmsa yqtefevbjv
hxizrrnjox zbrfyeiwkl
fcyvecwnoo hahfvwqhud
cqpeikqpuk ...

output:

10

result:

ok single line: '10'

Test #80:

score: 0
Accepted
time: 2ms
memory: 15872kb

input:

2
pswcjxutfi pswcjxutfi
umklwegufd pswcjxutfi

output:

1

result:

ok single line: '1'

Test #81:

score: 0
Accepted
time: 0ms
memory: 15580kb

input:

4
smufwsdwpn smufwsdwpn
iuisrxwhos jpmsdsgovu
jpmsdsgovu jpmsdsgovu
nrexwhmxxc smufwsdwpn

output:

2

result:

ok single line: '2'

Test #82:

score: 0
Accepted
time: 5ms
memory: 15444kb

input:

6
dlmpavfvxu spmlnvutug
dcbggabqfa dcbggabqfa
fykntcdyiy spmlnvutug
spmlnvutug gyuheqghid
cpwkmezokm dcbggabqfa
gyuheqghid dcbggabqfa

output:

4

result:

ok single line: '4'

Test #83:

score: 0
Accepted
time: 5ms
memory: 15212kb

input:

8
sznluxwysm lxvoxtkvhz
mlybufvdsk lbpegbxnxo
pfvqwndfxx ocysvimbad
lbpegbxnxo sznluxwysm
lxvoxtkvhz sznluxwysm
ocysvimbad lxvoxtkvhz
qltjhcpxjm ocysvimbad
vdyhyqypxv sznluxwysm

output:

4

result:

ok single line: '4'