Statistics

Problem Statement for "ThirteenHard"

Problem Statement

Despite being beautiful, funny and intelligent (or at least she thinks so), Elleonora has one great disadvantage – she is really superstitious. Although at first sight this seems to be a small thing, it influences great parts of her life. For example, planning an evening out with her friends is quite a challenge for Elly.

While travelling somewhere Elly counts the minutes passed since the time she left home and insists on arriving everywhere such that the time for any segment of her trip is not divisible by 13, since 13 is believed to be one of the most fatal numbers. Here, a segment of the trip refers to any consecutive sequence of transports used by Elly. This means that if her path is home -> station1 -> station2 -> destination with travel times home -> station1 = T1, station1 -> station2 = T2 and station2 -> destination = T3 then none of T1, T2, T3, T1 + T2, T2 + T3 and T1 + T2 + T3 should be divisible by 13.

For example, let the durations of the transports Elly uses be 7, 10 and 16 minutes, respectively. Then, the segment with transports 2 and 3 has a total duration of 10 + 16 = 26 minutes, which is divisible by thirteen and this will ruin her day. On the other hand if the segments of her travel were with durations 7, 14 and 16 minutes, then none of the numbers 7, 14, 16, 21, 30 or 37 would be divisible by thirteen, so this would be a valid path.

There are N stations numbered 0 to N-1 in the city where Elly lives. There are transports between some stations and they are described in String[] city containing exactly N elements. The j-th character in i-th element of city describes the duration of the transport that goes directly from station i to station j. Durations of 1, 2, ..., 26 are encoded with 'A', 'B', ..., 'Z', correspondingly, and durations of 27, 28, ..., 52 are encoded with 'a', 'b', ..., 'z', correspondingly. If there is no transport going directly from station i to station j, the corresponding character will be '#'. All transports are directed, so if there's a transport from station i to station j, there will not necessarily be a transport from station j to station i, and if there's such a transport, it will not necessarily be of the same duration. For each station, there can be a transport from this station to itself.

Elly wants to reach station N-1 (0-based) starting from station 0 and using one or more transports. More formally, her path is a sequence of stations S[0], S[1], ..., S[k], k ≥ 1, where S[0] = 0, S[k] = N-1 and for each i, 0 ≤ i < k, there's a direct transport from S[i] to S[i+1]. The same station can appear several times in her path. If T[i], 0 ≤ i < k, is the duration of the transport from S[i] to S[i+1] in minutes, then there must not be any indices i, j, 0 ≤ i ≤ j < k, such that T[i] + T[i+1] + ... + T[j] is divisible by 13.

Return the minimum time in which she can reach station N-1 while respecting her superstitious requirements. If this is not possible, return -1.

Definition

Class:
ThirteenHard
Method:
calcTime
Parameters:
String[]
Returns:
int
Method signature:
int calcTime(String[] city)
(be sure your method is public)

Constraints

  • city will contain exactly N elements, where N is between 2 and 25, inclusive.
  • Each element of city will contain exactly N characters.
  • Each element of city will contain only the characters 'a'-'z', 'A'-'Z' and '#'.

Examples

  1. { "#AB##", "###A#", "###C#", "####K", "#####" }

    Returns: 16

    Here the shortest path is with length 13, but that makes it forbidden. The second shortest path is with length 16 and is OK.

  2. { "#Z", "Z#" }

    Returns: -1

    Here the only path is impossible.

  3. { "#A#C##", "##FA#K", "###D#D", "A###A#", "##C###", "####A#" }

    Returns: 10

  4. { "#AAA####", "####A###", "####B###", "####C###", "#####KJ#", "#######L", "#######A", "########" }

    Returns: -1

  5. { "Good#####", "#Luck####", "##and####", "##Have###", "####Fun##", "#####in##", "#####the#", "CHALLENGE", "##PHASE##" }

    Returns: 137

    Good luck and have fun in the challenge phase.

  6. { "##", "A#" }

    Returns: -1

  7. { "#abcdefghijknoy##########", "###############M#########", "###############M#########", "###############M#########", "###############M#########", "###############M#########", "###############M#########", "###############M#########", "###############M#########", "###############M#########", "###############M#########", "###############M#########", "###############M#########", "###############M#########", "###############M#########", "################L########", "#################L#######", "##################L######", "###################L#####", "####################L####", "#####################L###", "######################L##", "#######################L#", "########################L", "#########################" }

    Returns: -1

  8. { "YN#######################", "##N######################", "###N#####################", "####N####################", "#####N###################", "######N##################", "#######N#################", "########N################", "#########N###############", "##########N##############", "###########N#############", "###########YN############", "#############N###########", "##############N##########", "###############N#########", "################N########", "#################N#######", "##################N######", "###################N#####", "####################N####", "#####################N###", "######################N##", "######################YN#", "########################N", "#########################" }

    Returns: -1

  9. { "#y#######################", "##z################n#####", "###z#####################", "####z####################", "#####z###################", "######z##################", "#######z#################", "########y################", "#########z###############", "##########z##############", "###########z#############", "############z############", "#############z###########", "##############z##########", "###############z#########", "################z########", "#################z#######", "##################z######", "#z#######################", "####################n####", "#####################n###", "######################n##", "#######################n#", "########################n", "#########################" }

    Returns: -1

  10. { "pQHMAlldFRVcGBkNDXfFzsTjR", "PgrnVsMCSYqeIeFzIKAVseZYx", "xLGPFdOexBOJvVBYPElpnlvVP", "AYHqqqmujOVOuwMNbCKfkaxkL", "JhiJwKuNxzzmMQOeLhKAgqcDu", "EoWYzVCPalVuFAvZltkcWrEJh", "iCbcFLitDvhclVyWBsmoxlCmX", "HMNEfXTggPYneCKpskJGGkDze", "PVgIpsdJZjLhbQKMZBWbDuFKR", "rEMDyJEHsQoiiFoEdPzNVMTtd", "QOMvpPUcaumEtLgPNDbPETJPR", "OzQoyjbADDpjxHoPWYhqhbFVN", "qrjXOvIxZZskUVjrMzOkieRAD", "gnUHxqJJWxmshLqZdtZTjnXgs", "SZNCvafmoHWbZUwjRmMHhRWBr", "BFBEhUiwbtebcXfxfCKFCCtGu", "mRBzShReWjxHuYpWEQriIfDuE", "OQuhenHIUzSUDBRStRCYaFVde", "TiUujeczbKdqIFBchhdGJllaA", "CRSidtCLFeJThCAbexxgeYhGc", "RDpMCoROPFhoqLfWKfDYmCsSo", "SDJHWBxmUFQaQClNyQQyWYbac", "kkKdiCyuFBSEygvdPAVFRrskT", "DHRIbzZjMYpaAWEJchrvjSdOT", "PnpYgIOqWwZQeOesxvIPLyMmu" }

    Returns: 9

    A lot of transports in this city.

  11. { "kHE######################", "#DRC#####################", "##FZG####################", "###pFD###################", "####JJW##################", "#####qUq#################", "######IvV################", "#######Zyi###############", "########guL##############", "#########jus#############", "##########abL############", "###########mqM###########", "############jjh##########", "#############SQT#########", "##############dEm########", "###############cbr#######", "################tEY######", "#################wGJ#####", "##################LRM####", "###################Aaw###", "####################vsB##", "#####################OoL#", "######################Hpv", "#######################UH", "########################S" }

    Returns: -1

  12. { "#K#######################", "g#F######################", "CH#y#####################", "ZES#y####################", "Htzo#T###################", "jQRih#A##################", "qeHpmJ#W#################", "fycJcdu#A################", "GCdigEUi#v###############", "yOpGnuAed#R##############", "dHCmJUMkqC#o#############", "ZglAftRHAQh#m############", "riZyRnMJElcD#k###########", "xBjEUrxuReXcW#n##########", "CDuCvDxdmAeTKf#y#########", "gkLOoJvgqBotsdA#X########", "iXwbVlqZxwdbcKPP#F#######", "gQMlJBHCqBWUmzLCf#F######", "RUPHvycusuPfGltSep#M#####", "umnMZqKmfePpLfpPfxI#w####", "SkKEHUFRBMNPvSyDmnpt#M###", "ljZxhWFSUVFPQbBBHXaNN#m##", "JcBJhXvKJDQidLItKGtXjm#t#", "oXubzzlRlWtUoYZypRddcDn#R", "#########################" }

    Returns: -1

  13. { "AAAAAAAAAAAAAy###########", "AAAAAAAAAAAAA############", "AAAAAAAAAAAAA############", "AAAAAAAAAAAAA############", "AAAAAAAAAAAAA############", "AAAAAAAAAAAAA############", "AAAAAAAAAAAAA############", "AAAAAAAAAAAAA############", "AAAAAAAAAAAAA############", "AAAAAAAAAAAAA############", "AAAAAAAAAAAAA############", "AAAAAAAAAAAAA############", "AAAAAAAAAAAAA############", "##############y##########", "###############y#########", "################y########", "#################y#######", "##################y######", "###################y#####", "####################y####", "#####################y###", "######################y##", "#######################y#", "########################y", "#########################" }

    Returns: 612

  14. { "Without", "####IT#", "#Im####", "just###", "###espr", "#######", "#######" }

    Returns: 46

  15. { "###No#####", "####Zaphod", "#####Just#", "######very", "####very##", "improbable", "##########", "##########", "##########", "##########" }

    Returns: 103

    You can use random messages as challenges.

  16. { "#####From###", "#all########", "######the###", "###things###", "ive#########", "####lost####", "##########my", "#mind#######", "########i###", "miss########", "#the########", "#######most#" }

    Returns: 95

  17. { "########If##", "######youve#", "######failed", "#######this#", "testcase####", "######you###", "###would####", "###feel#####", "####quite###", "#####stupid#", "#wouldnt####", "#########you" }

    Returns: 133

  18. { "##########Isnt##", "#############it#", "#cool###########", "##########how###", "#####you########", "#########can####", "#####write######", "####ANYTHING####", "#######here#####", "########and#####", "########it######", "###will#########", "#####be#########", "###############a", "##valid#########", "#challenge######" }

    Returns: 73

  19. { "Elleonora", "###is####", "####quite", "beautiful", "###by####", "###the###", "######way", "#########", "#########" }

    Returns: 27

  20. { "#This##########", "######problem##", "#####was#######", "#supposed######", "##########to###", "##be###########", "#included######", "#########in####", "####our########", "universitys####", "####competition", "###called######", "#the###########", "########deans##", "####cup########" }

    Returns: 133

  21. { "#This###########", "########is######", "####like########", "##tweeter#######", "but#############", "#######not######", "exactly#########", "##however#######", "###you##########", "######are#######", "###########still", "##limited#######", "############up##", "############to##", "##fifty#########", "#####words######" }

    Returns: -1

  22. { "##########Everytime#", "##i#################", "######see###########", "############you#####", "###oh###############", "#################i##", "###############try##", "#to#################", "hide################", "away################", "########but#########", "###########when#####", "#####we#############", "meet################", "###########it#######", "seems###############", "##############i#####", "#cant###############", "##############let###", "#############go#####" }

    Returns: -1

  23. { "###Everytime", "########you#", "#leave######", "########the#", "###room#####", "####i#######", "feel########", "#######im###", "##fading####", "like########", "######a#####", "####flower##" }

    Returns: 31

  24. { "#####Oh##############", "##############the####", "night################", "##############is#####", "############my#######", "#######world#########", "##########city#######", "########light########", "painted##############", "##girl###############", "##########in#########", "############the######", "##day################", "##############nothing", "#########matters#####", "#its#################", "##################the", "###########night#####", "####time#############", "###########that######", "#####flatters########" }

    Returns: 112

  25. { "#####Eating###", "#seeds########", "#as###########", "#####a########", "#####passtime#", "####activity##", "#the##########", "###toxicity###", "###########of#", "##########our#", "#######city###", "#of###########", "###our########", "####city######" }

    Returns: -1

  26. { "################Now######", "what#####################", "###############do########", "#####################you#", "###########own###########", "##the####################", "######world##############", "################how######", "#####################do##", "##you####################", "##own####################", "####disorder#############", "###########disorder######", "################now######", "######somewhere##########", "##############between####", "#######the###############", "############sacred#######", "silence##################", "######################and", "#########sleep###########", "##############secred#####", "#######silence###########", "##########and############", "########sleep############" }

    Returns: 146

  27. { "###############I#####", "#######close#########", "my###################", "###eyes##############", "#########wish########", "##########it#########", "############could####", "#####be##############", "##############true###", "#################wish", "############I########", "###could#############", "####fill#############", "########you##########", "###############with##", "########these########", "##########words######", "##########I##########", "#####DREAM###########", "#############OF######", "#############YOU#####" }

    Returns: 77

  28. { "########You########", "###########are#####", "#########blessed###", "################to#", "#########cry#######", "###########as######", "#############you###", "#######change######", "##########your#####", "#####point#########", "###############of##", "##view#############", "###and#############", "##############you##", "###############lead", "#yor###############", "######fears########", "########to#########", "##########burn#####" }

    Returns: 150

  29. { "############You", "###are#########", "########blessed", "##to###########", "####fly########", "#####and#######", "#######able####", "#########to####", "#return########", "######when#####", "##########youre", "#####bleeding##", "##########for##", "the############", "######cure#####" }

    Returns: 47

  30. { "###########Hush##########", "###########little########", "######baby###############", "#####dont################", "########say##############", "###################word##", "##################and####", "###nevermind#############", "####################that#", "#############noise#######", "################you######", "####heard################", "####################its##", "######just###############", "##############a##########", "#beast###################", "####under################", "###############your######", "#####################bed#", "#################in######", "#your####################", "####closet###############", "#in######################", "#########your############", "##########head###########" }

    Returns: -1

  31. { "#################So####", "#############close#####", "#########no############", "############matter#####", "#######how#############", "far####################", "############couldnt####", "###########be##########", "#################much##", "################more###", "################from###", "##the##################", "#######heart###########", "############forever####", "##############trust####", "##################in###", "#######who#############", "##########we###########", "#########are###########", "#########and###########", "################nothing", "########else###########", "##matters##############" }

    Returns: 211

  32. { "#####Welcome#", "#########to##", "#####the#####", "####Hotel####", "##California#", "#such########", "####a########", "###lovely####", "place########", "##such#######", "###########a#", "#lovely######", "#####face####" }

    Returns: -1

  33. { "#######Live#", "####Another#", "Day#########", "#######Climb", "####a#######", "###Little###", "###Higher###", "#####Find###", "##Another###", "##Reason####", "#######to###", "#Stay#######" }

    Returns: 58

  34. { "#######Back##############", "#row#####################", "##to#####################", "the######################", "#################left####", "##A######################", "#########little##########", "##################to#####", "##################the####", "#################side####", "##########Slightly#######", "####################out##", "###################of####", "#########place###########", "##################Look###", "#####beyond##############", "################the######", "#############light#######", "################Where####", "###you###################", "least####################", "##expect#################", "####Theres###############", "#someone#################", "##########special########" }

    Returns: -1

  35. { "######This############", "############world#####", "###############is#####", "##spinning############", "############around####", "#############me#######", "########the###########", "######whole###########", "#####world############", "#######keeps##########", "##########spinning####", "###############around#", "##########me##########", "######every###########", "##breath##############", "####leads#############", "####################me", "#########one##########", "#####less#############", "####################to", "##############my######", "#last#################" }

    Returns: 158

  36. { "##x###P###########R###A", "##W######R#F#P##m#Br###", "########x####h#########", "####i###s#f#######qM###", "#################crB###", "###dh##q####Sj###vo####", "gf#######Z#############", "D####x################z", "R###qIn##t##bi#i####sYI", "###X###########D#######", "R######c##########Cs###", "h##z#####x#############", "R######ji#####AR#####Tf", "C####YP##m##########x##", "z#Y##Z#######n#########", "#L#e#####d#############", "####h#Go##Wqr##########", "##Tj###JA#############Z", "########t#####I########", "########LA#C###########", "##M##########QOIYU#####", "#F#######ch############", "#######M###iJ###I######" }

    Returns: 1

  37. { "##c##U#wpmQ#sy##EGQR#", "##wkpmhiZ#WAgBPbO#kC#", "x###rlqJdJ#Vk#tCyOE#U", "h#S#YL####egb##t##hgB", "#Yg###HPPnBGGcN##b#x#", "hTwH###Vyy#L###t#####", "OU##m####d##o#ua#Zn#k", "cv#U#Cs#HsGj#Q#tD#DTy", "yScjd#eb##s#T#Iv#o##j", "ko###RflR######B#MjXQ", "r#M#Srr##B#tME####n##", "A####RxPF#P#YkhDp#oN#", "#Mgg#cY#l####LSZ#zN##", "DlJX#s#jW##u####w###O", "IQ#nx##Y#h#QvH##wRac#", "ERvxpo##ey##n#h#o#fgp", "#Ye###D##vw#Fdl##GTZ#", "AbL#HgV#X##mxxsDP#O#A", "####KXvPdi#W#R##Q##go", "#D#z#rHiy#iMjTG#Eal#B", "#df###pmw#D#####L#Hk#" }

    Returns: 8

  38. { "####v##########Z########", "####BG#############T#e##", "######md#j#####K########", "####J#######pk###P####m#", "x##c##w##P########e##G##", "C############o##z######T", "##qv########TV##########", "#####sf#o##w##########V#", "#######h##Xc#y######o###", "#m######J###########q###", "#######A#######E########", "r###########t##CG##V####", "###########n#U########pR", "######w###v######a#o####", "######################W#", "###################t####", "##########Y########Tx#Z#", "########L#####t####b##J#", "##R#O########k##########", "#K###################qW#", "#######z###c############", "#########f##Zh###l######", "#############X##l#######", "#t###########l##Y#######" }

    Returns: 137

  39. { "##V##k#DF#frAtHpgRo#J###", "S#EmG#N#R#ZQv#qu##Cv##lT", "####H#ZO##NN#Nz##P#uw#yJ", "#gT##FP#iwfX#k#Yc#mu##GK", "#y#q#K#ONRJCvPqq#cvR#YW#", "KGPJo#####G#RKt###NrVG#a", "#Z#RgI#OU##ZH#Nf#RaKZ##s", "n#dg#YB##t##fT####s##Qfg", "#Kk#yHEo##h#I#tQkF#YixS#", "xo##l#JK##hXfX###eexZu##", "O#j##GC#Zy####q##tPW##Nh", "Xp##MV#Q#Z##x##z##O#kfG#", "q##RA#mr##M####r#VZB###M", "#qx#hAphy##jP#f####j##M#", "##E#dG###LVl#e##y#hhs#Pr", "#TY###CQJzz#eRv#H#PMuqR#", "F##V###U##lhi#Wm###To#W#", "W#te###D#CslC#jcR#QE##kb", "mCtVQ#ZbP####h#t#V#oc#gL", "lx#Z###Id#vE#rSZGi##I##v", "###NAS##q#t##ea#s##i#L#M", "###WpnRdj#b##g#x###s###n", "F#PuC#TD#r#XaWa#mN#U#O##", "#R#lD##PtLJ##D#S###iuqX#" }

    Returns: 30

  40. { "##H###X#####YS##j#JUY#m", "##f#KnsL#tQ##Xf##E#####", "#y#y##C#vTF##XnR#T#C#NV", "####h###Fl#I#P####sn###", "u##R####e#####apSB##ZK#", "#######G#PDyM##g#gWO###", "#QT#####W#####q########", "###d########mm####W###o", "#O##o##R#k###Pi##aj###K", "cZ##ziE#S###r#####X##p#", "au###s#W###M#EH##R####M", "q#####Ps#E###h##m#####x", "T#Pp##oD##n###x#iGBYuQ#", "###u#######LZ#D#A#####S", "gVTpi##ZS####c#G####Fle", "b#####W###s#R#g###v#S#A", "q##o#m######hPa##D#f###", "W###e#g#u#####D####dX##", "#A#Pf#Lhk#w#Z#A##m#####", "######uJC##ARs#########", "m#QUA#V#VS###w####xG#VJ", "######o##w#Sz#r###P####", "###n#####Dj#####D###Sj#" }

    Returns: 19

  41. { "##hG######Mv#e########X#O", "###S###J#B####yRnF#P#####", "######Y#L#I#T#KRQ#bR#vt##", "#fQ####a###v##c#ck##C###R", "n##l#####t###O##L####pY##", "#Z##C#####o##R####b#####E", "#Z###g#ex########Ok#cv###", "####d###A###je#Qk#####Y##", "J#c#w#Q##aE#K#a#z#oi#r###", "####K#U###k####ln####M##s", "####zFLW#B#n#iQ##########", "########J#M###K##P#Q####b", "####Y#tu##YD######G######", "####D#JvLHIbX#c######i#jU", "ZL#r####F####I###Q#k###jl", "###c#####jQ#A###a##SBBB#Y", "#g##oa#G#########bo#i##z#", "#V##fwq#####CRg######d#jd", "#L####O#####W###d###j##m#", "hSe#######LCT#dc#x##e#d#O", "uLl#a#F##n#DZ#s#a####y###", "#V##x##uC####Ae####r##tiG", "#######dm##Gm#vS#########", "##HZ#####d####R#cb#FZ####", "xz##c#Rif#VQ#############" }

    Returns: 15

  42. { "##H###V#f#A#HEEC####fR#sU", "#####E#R#Wk#I###I###f##BJ", "Q###d##P#M###hN####C#L#q#", "####xta######N#e#im#j##Sq", "#####q##y##bZ##bb###un#yG", "#HQ#J#tXP#g###ZbRZ#c####e", "gY#######Q###Mc#uv#tt##t#", "#q####K#Zo#G###I######YGO", "##S#eo####sxFkG##Uj###D##", "##c#Ef#M##m##dy##HHI#l###", "###v#b#us##Q####b#pi###Tg", "#fscp#Qe#AF####Ve######hL", "I##r##x###dU###########Rw", "#NSlRvZy####e#xasbLg####j", "#ev####Zg#Pxu##xU##g#M###", "TH##e###gHL#HI###X###A##l", "Wfu##dx##k#Z#pu###Q#v##c#", "M###A##S#H#CRd#Ck###l#H##", "##KzcD#Ef#Uh#fc#g##lSl#zr", "F#C##Ez#W##N###eb###SV#Tv", "##SoMM#o######Q#Q#W##L#lV", "#Z####R#j###N#w##o#fs###r", "PpINhJ#q#xlZtnc##ZQ##J#cP", "Bct##B#O#B##f#K##IM###n##", "Y#pOdO##nQgo#sC####isCOC#" }

    Returns: 21

  43. { "##############ta##o#####", "#################K####G#", "#R###################E##", "E########h##############", "##############y#B##H##z#", "######mhB#####J#WA#L####", "################K######X", "####k##########p#Y##s###", "############K###w#d#####", "####P#u#####e###I##b##sO", "#n####j####g#####p######", "H#####t#hm####T#p#######", "######Z#################", "########H##############q", "###E####################", "#######z################", "########################", "r###############P####t##", "#M###########VF#########", "######k###yR###g########", "########################", "#W####d#####K#####J#####", "######E###########W#####", "########Au#########T####" }

    Returns: -1

  44. { "######s##d##b##pbo#A#", "###SlU##H##A#####E###", "T##d####rlns###H##rU#", "jB#########q#q#V#####", "o####m########W#D#G##", "c#i#########i###b#h##", "x#t#AP#a###P#n##j###y", "##r########q#B###zQ##", "#######S####J####E###", "k##B######HUEBV#J#Qa#", "##xA###j#J#x#q#x#JOp#", "i##S##e#j############", "#Qq##X#P#lC####MC##z#", "#b####K####aH##oO###O", "######d########oIm#oo", "o#fP###znI####i#K####", "###U##DJs###A####GZI#", "#Pdc###Qp#i#ux#s##np#", "##W#####YT###p######y", "#T###O####m##vQmjg##F", "v#a#t####N####sy#O###" }

    Returns: 7

  45. { "#####GJ#Of##wE######p###", "####NS#G#o#####d########", "######vB###g#######lQx##", "X#P##n#DC##NZ##Qs###E#lx", "###p#fv###kEP#####iJ####", "#t##p#d#n#r#N#AF##YQkt##", "###########Ml#S#y#######", "###N##I#c#####u######iw#", "#M##h#j##########kCr##J#", "Xb#V#s#EE###rSYSnPEz#G##", "#####fO##g#YA#i#LP####C#", "yA#Sp#####J##P#J###W####", "G###NGcZ#####u#D#LV#####", "#J###sfO#########v##xm##", "#kY##AF###gK######k##l##", "#u##Q########nq##I####Xq", "###########N#If####ny#P#", "###I#u##wdr#####u#VV####", "#H##########Z###eB##t##Z", "##EJ#Aw#u##qD##W########", "######VC#x#J#########Tpj", "#e###U#H#q#k###q#VUF##lU", "#####ma#U###bX#####S####", "#mWgR###Bv#####Rx#K##U##" }

    Returns: 58

  46. { "#P#m##s####t####c###I#H#", "####T####B####GnIO##a##a", "B#######C###sZ#S#K######", "F####xUH##s##h##########", "###M#uX##########B##F#hn", "##G###xp###E######Z#M###", "q##m######P###x#########", "###H##Z###i#####P#####E#", "#w########q#####Y######i", "a###t#####nMa#R#o###N#Y#", "#####J#####A##B#########", "########w#v#Bf###b####o#", "s#d#######C######rc####L", "##########xt#####pv#####", "#v#a#####t#######l#####t", "i###vXS#SQ#q#W####e####B", "#########X############o#", "##l#######Po##G######K##", "o#b#####C###d###########", "#ZTZr##########ef####NE#", "##########W###JG#e######", "L#X##A##I#####rD########", "#####B#####X#####MJ#iC##", "O#t#dl#D###qPF#####x####" }

    Returns: 17

  47. { "##RB#K##u#n###K##Bam#", "b##t###QWfFBK#####P##", "####z###d###g#r####P#", "r#####i#L##x#M#######", "#h####T####VA##r##X##", "###r#######Ix#W##w#sv", "##o######Hr##T##x#h##", "########wg#h##vTz#QRR", "##i##########U##Vc###", "j##Tr#F########de#wo#", "#T#qw####H##T#K##c###", "#####P######NvR##RELU", "#########p####Ev###G#", "#P############g#d####", "#a####zP##b####U###zp", "####U########nB######", "thfa######a###E###Y##", "F####fP#Hs###X####M##", "Bc##n##Qw#b#X#o######", "#B#####X##xY##L##m###", "##sVWt###D####N##y###" }

    Returns: 41

  48. { "#W###QHjRc###W##fZZ#sK", "##sm#xH#LRhrR#On##VMH#", "###WG#i#ce##F#z##R##YK", "#z##S#f#rq#jCE#UPh####", "rpr###U#C#R###q####Y##", "whd#y##ujrs#l##mYlZx##", "d##A###Varf##Kw#Nn#Vdk", "#i###dD#m###KL#wtTR#j#", "##XOo#lG##dX####JsUnM#", "k#nH#a##i###B##AMa####", "V#vsu###KY#ATqLIa####R", "#MOz#v####q####IsBMc#k", "I#Br#yzgJ#UB#iuESs##c#", "CL######P#####GG#vA#L#", "q##ggav#q###yQ##u#hs##", "T#fxgy#k#nmui#####Lv##", "##d####kK##SoH#F##AMxY", "Z###yhf##JV##X####j#m#", "#####O#Pt#F#VBm#s###A#", "A#Dty#yWn#m#e#ff#d####", "k##O###BmRr#####c#Fu##", "VK#k##Aoq###V####dn###" }

    Returns: 11

  49. { "#########V###############", "####T##P#U############ak#", "##############I#########y", "#######se#######i#b#Ze###", "######d#P######iFK##b#CP#", "#DPU#####################", "#####v##########q##t#####", "BBO###D###########Vj#F###", "#########################", "##################h###Z##", "##c#g###bH##d###T##y##t#h", "###N###R##########L##N#jF", "#####o#####f#############", "########a##G####S##F#C#D#", "#########k#f#a#u####vD###", "#####m#i##kvQ######wMb###", "BY###dHc#ESi##V####j###B#", "##############D###S##K##L", "########t####b##T###O####", "#E#d####K####e#rY#b#jA###", "#####e####i####b#XnS####v", "##########g#F#######m##A#", "###q#wX#q#######J########", "##O###########IR####s###u", "vr###U#####id##T#x#x#Y###" }

    Returns: 119

  50. { "####TN#p#####l########", "f#####c#iV###H##h#####", "##########Y#s#r#####C#", "####VTog##############", "#######k####b###Q###s#", "XLA#R####TJ###d#S#U#y#", "####I#########K#e###P#", "########Iua#####y#B###", "###############n###U##", "V#######C##w########D#", "Vc#H#d#J####r#########", "P####f###C##kH#i#G##cU", "#####K#R#####W#I#####t", "q##PG#p#F##c##nBsJ#San", "#yoxeb###t###n#ps#z##G", "############X###X##G#h", "QEe#####bk####Ln##qcr#", "#x##T#####c#Y##Z######", "c#Oz##C#####mK##Kl#OB#", "s####D###K#k########P#", "###V#######O#######c##", "##Kbv###n#######V#####" }

    Returns: 51

  51. { "########W###gJm##p##b", "R#Mq#vFl#i#Uc#####a#T", "Ow#Q#NP#P###Z##R##G##", "#####dGE#I#######i##R", "#cl##W######T##nN#D##", "v##n###VA##RZHc###UZ#", "q##h#J###Yus#z##DY##t", "q#KL#Qt#k#m#N###v##Rf", "t#c#XK#####B###xa##CU", "y##BwS#hN#dJ##Bf#J#V#", "###Oya######x######eb", "Cyw##iTe####s#N#####G", "#######j##jO##F##B#Av", "m#U###k##hm#h#u###X##", "#uHQ#I#P#z#######VX##", "YyR#t##St###u###M#F##", "#mZ#AU#F#t#PV#A######", "##############E#####u", "ed#ylG###bune####W###", "#Ax#E####jiQ##vz#U##c", "x###PP#Ws##c###r#K#Q#" }

    Returns: 28

  52. { "######Xkd#IP#Lx#W#d#E##", "J###F#A####h###GI#H#Kgw", "####c########H######iW#", "####p########s####J####", "H#######p##Q#N####mO###", "x##x###B#I##C#z####g#K#", "###vy####Q#####h#E##I#G", "iHw#X#####f#Sln###U####", "#c#Lk#Ma#X##wds##Z#####", "X#z#####C####ZP##W#####", "R##z##b##r##h######t###", "y#####Z#rM######T####go", "###knS###w#####a#######", "t#q##jcF###x####O#u####", "##J#########O##########", "S#V####Z##J##M########G", "#rb#X#####l######Fj#M#H", "######A#w####v#####PU##", "#C##N#####v###vLj######", "####eC####WjE#jqa######", "###tMp#######CL######M#", "#####eJ###SHo##GW##BC#n", "##F#######K########y###" }

    Returns: 30

  53. { "##NfmOFu#A#bl###F#cdJ#", "##s#R#CMnsAK#rnF#LmUsc", "H##TTz#HI###Z#Tp#Tivxf", "#N##K#gXxK###nH#bxh#bn", "##GY##QM#pCi#RkW#zV#C#", "#F#JN#t###UFxp#Fhitnm#", "##tu#s#r#Fr#uA#rIcG#rt", "U##tOqn#tS#WlUHRQG####", "aL#Gax#c##R##wt##bKBqw", "FO#loNX#u#i#wLG#T###iF", "r#y#c##L#c#l#E#U###jK#", "h###S#ibYkk#YPe#RPRg##", "##h#y##Z##g##vP##JHYjR", "#XpNFUq#pqK###wzV##LCu", "jE#g#Dc#SqaU###QQ#uY#t", "szfqFv##M##EhP##wpjCYg", "#iT#p#aIEY#Bgb######vd", "zW##SMe##nYp#ruvv#RHnR", "#dqQ#sN#GB#Bk#L#sG###k", "x###k#c#We#X###H#####a", "#k#f####J#iCDl#jfvh###", "#uwI#Xeodbw#H##l##ZUs#" }

    Returns: 7

  54. { "#M#e#h##wogHl#LM##R#b##", "T###xx####e##K#Ep###V#j", "Km#scSec##U##XKM#Z#J#Wg", "smM##r##VKxsI###Q#e#O#d", "G#z##N#e#c##OUK#UBg#A#u", "##rlS##rQ###pD###rkBK#K", "#E###M#####rC#qR#p##I#v", "###i#QI####x##l#####h#d", "#yZ#K##T##XcqKv#M##UMBi", "Iqai#oxX####XpB##xXUj##", "o#U###u##i#ab###U###h#N", "#a#KE#k##Go#k##U###H##o", "###Fo###Md#O#JR#y###N#x", "###xKtUFk#B#h#yKydE###E", "##Gtz##eHJhNzG#Xs#NjKk#", "##zl#n#yjZsMi#X#kE##oM#", "ZJ#J#q###uDCV##J##xqmaU", "#ukbW#lb##p##e##O##QKn#", "#s#UrW##H#oO#K#SS##ee#M", "c##qB####vrZ##w#l####QC", "lc#pTS#g##z##WI####u#x#", "ti#mfkXh#k#ma#nJLZ#hp#w", "PsP#####fKNkVts#bLsv###" }

    Returns: 19

  55. { "#un##p#eu#S#keT#P##xxFq", "h#N#Ue##lSJ##gT#Xkt###p", "####Yzek####y#gBMg#gj#D", "#vS##mP#rv###KM#DV###T#", "Jf###qk#X###kCjM#HmS#je", "ko#c####RSvBuhyi#J##RV#", "##BoJo###YJdGFW#BD##fWE", "v##pr#E#FC#J#JM#yAo#Bgo", "mc#xs#P##HVDfe###D#jBUL", "#y##jqY#q#USOPJ####s###", "l#BuQTu######n##J#QKAx#", "ppwZ##MQs###FHb#Tcu#ry#", "YH#i#ghOfx#b####MYqdP#W", "Brvb##h#q#####LCDL#Kl#x", "LxLg##Y###Y#FG##i#n#sJv", "##syO##gRXKxM#g#cBYBWS#", "#UVp#BBE#fQMPOWm##g#Ao#", "GBW#x##i##R#t##M##tszE#", "dW##ePvW###a#V#hK###QZ#", "x#t#C##I#h##moU#N#W#NgR", "#HiHxJ#WQ##nv#jk#F###Fe", "##Rzg##x#V#AbOdMPzjSf#Z", "Ml#####WX#OWzBL##w#xnH#" }

    Returns: 23

  56. { "#rLTP#E###ojhrnVxUoA#", "##k#Sz#Vt#DuTWW#ij#i#", "dv##wPUyu#C#b#i###WPh", "KBC#uxG####phx##O#UeS", "CF#S#Ykbm##z#HORD#Bp#", "fZZW##S#pIEWN#NXuMHrd", "#lV#ZP#v#xNI##zY#R#u#", "VaFfS###sj##cHLiwpntp", "jY##k#lz#SYo#E#h#A#Kz", "VrO##Vb#t#pMI#aGr####", "VF#wH#I#Oa#VzSk###QTc", "#Awe#fyG##w#nWK#uci##", "iWpLR#mmw#jQ##OLevodo", "GBul#####slwt#BvF##Sn", "####vlh#n########HmUT", "qIl#DMJq#BBq#nq#J#w#z", "sf##kj##G#r#YN#O#ivgx", "V#NMCT##d#A#Az#Z##T#F", "E#VeeYQ#dH###NiyIJ#hS", "#hbBt#kM#bV##a#t##B##", "aimS#n#c##gu#MGLfRL##" }

    Returns: 22

  57. { "#########d#######K##S", "########R#J##########", "x#############nq#####", "#K##################C", "######l##Q###########", "####Q#####J######spu#", "#########F#P#########", "#e##Y########E#######", "###############Q####D", "#b########uxhi#Q#####", "###V#######M#########", "##j################z#", "###b#############b###", "##GM########W######S#", "######I##v###C##y#bT#", "#b##########e###o##JR", "##D###############nV#", "###########U#########", "########q###########H", "#####R#######B##Sl###", "#s#####v###SM###zQ###" }

    Returns: 19

  58. { "######z########eVh###", "####p###e#i#####D#h##", "#####e###############", "#v#####p##L##########", "z########l#B###T###T#", "l#######u####M#######", "#######u#####H#D##b##", "##M##################", "gx#H#o#A##W##w###Y###", "###g#I#######h######e", "#m####w####I####p####", "#######X##########f##", "#######Ssm#####r#s###", "####G#####q########h#", "#P###########d#####w#", "Ft##Om############q##", "###c##########v######", "########U######i#####", "#####U#l##t###G#xQ###", "####I#oG##AO#I#######", "######uP#Z#####m#####" }

    Returns: 115

  59. { "##BEk##qf#q####Di##Q#", "##gy#DN############I#", "###Pe#####e######N###", "#########H##zZ###w###", "#####################", "###e########n##r#hU##", "r########K########u##", "#xY##u###E##########g", "#Tun##############J##", "o##cQ##V####gC##p#t##", "oaK#tUX#####a########", "t###Xi######S####A###", "##de############y#C##", "#f###m##D#c#D#####l##", "##I###z###V########d#", "#Ye####lT########RQ##", "#######T####W########", "#k#######V###########", "##N####H##w########P#", "#mq####q######Y######", "It#K#Y###C#######c###" }

    Returns: 62

  60. { "#y#yL#D###q##S##Q#rzE#gkB", "####g##o#wBr##LpBlh#l##dj", "E##oi#tY#c#SL#XJL#####E##", "##e#vrW#ar#V#REc#kTm#MMH#", "u####A#V##E#Ge##XE#S##KpY", "#T####Ue##iUZEJg#Ew##azYd", "tx#######dfwsvmI#ly#u#AhB", "#UusGgM#iHugbXs#rYE###rZd", "G##g#sO####i##x#oS#LH##Yu", "##fMeB#SY##iWw#kF#Z###H#A", "##l#Rk##I##B#FJtaq#P#x#Cb", "####c#WucQJ##L##T#hS#f#vj", "l#Cq#y##G##g##z#######U##", "e#NlLB##P#G#p###Py#mT#mcr", "#l#q#u#iK#V#KK#m##pHM##vJ", "Sp#E#i##zG#L#Hx######Eiv#", "BVB##uiOHJWNqJkT#y####HQz", "WfhW##TT#C###oMn##i#A##O#", "b#o#s##au#j#p##Ddv#rV#Y#E", "###eu#dTO#r#R##WCOb#u##ir", "##B##UI#AY#fQf##BDUt#Plh#", "n#rI#F##bNy##P#T#X##V##Ha", "w#LMh#b#u####q##dbMrkd#t#", "#ig#nFlOso####ou#JwhJ#i##", "#N###RS##s#l#g#oA##B#OqA#" }

    Returns: 2

  61. { "#v#DA#GVQk#bL##ai#vdc#DR", "k##lh#D###Mc#FO#eVJhJ###", "#u#Q#QEy#A#bDt#O#X#ROu##", "qCa#Iz#####s#y#o#AP##ZT#", "##cf####s#Z#R#txokNi###g", "k#Q###jo#Wy#x##L#ki###Mx", "PB###a###YL##YLa#t##MMh#", "Pv#G#####oAa#Em##Y##Q#I#", "YQ##Fc####K##h#TkL#EA###", "#Vu#j#o####so#F#k#Tj#QHC", "F####n#R#h###p#W###a#Fa#", "#i####L#b###AULpD#b#SCDz", "#j###dlfX#pK#fy##Om#Il##", "O#u##GCSW#fur#eQT#xZ#G##", "GJj#fVy###ZOgT#h#w#xC#m#", "####r###l###Vd###z##UtZd", "#N#u#YaE##j###bl###j#crc", "###k#C#hYz####Nc##BqtA##", "#zN#d#jSGT#p#w##KS#M##WY", "mm##P#bGUz##RhI##k###I##", "##Dvz##fG#####k##Y###mHJ", "##pVH#D#kep#bM#G#RSa###N", "#i##J###zaeVs#Nqq#k##i#z", "#eA###HL#et#ml#####mP#w#" }

    Returns: 18

  62. { "######y#####EY##########", "###l####R###############", "########A####D########M#", "#######I####G#####s#e###", "##############U####x####", "###X#####e##############", "#J###x###############p##", "ei######################", "#######################z", "###C###l###############m", "l########K#zZ####X######", "#####N########e###E#####", "########Il#############a", "##############y#########", "#########TAQ####h#######", "########F##e##########X#", "####x###C########zb####o", "###################L###A", "#######################C", "#############F####t#####", "#############y###ok#####", "######R###########N###Z#", "#########O###H###T##F###", "#j##p###########X####r##" }

    Returns: 32

  63. { "#A#TQbp#g#nOv##N#QpBiP#E", "###p##########ywoS#A###L", "kx##qriXeIfrZE#QpDXpdHob", "pgY#LIuMwH##v#W#M##ymeqk", "#KBG#hpV##A##J##xg#Fu#Qp", "AHEKK#b##uIC#hkT#bVuBYzd", "PXy#b##I#fvtUGRn#ZN#JdSo", "#r#p#FU##WLFbwm#oEUq#fq#", "##u###dg#Rm#nC####M#G#x#", "V#jsdWT#E#aFDka#yn##s#Kg", "pOiJno#O#H####Y#ShLHhcJ#", "#t#l##U#U####hR#H##n#ATI", "CHH##lpeb####vZkevanI###", "####nJ#RVcJ#D#dU#JD#D###", "#os#x##O#I#RtE#IU#FyDhxl", "dhH#hiD###iQ#a####zRHqGK", "##xiN###Vo##DiQl##lEyh##", "ULT#yQyZ##y##S#I##phu#z#", "ty#o####Sp#NvAy####E#bMs", "#tT###te#EOh##k#WTj#CDp#", "#k#axVZFnG##H#fu#####A#s", "T#REJ#gm#HpIUlZ##NW###aH", "sX#NzXAsA#ZgUC#xs##KPb##", "vC######p##A#A##X##NQ#Y#" }

    Returns: 5

  64. { "##w#toc#####m#rUgn###u#", "#####k##B#MB#Bes##S#A#U", "w###qYx#w####Z#TC#OR#j#", "#x###DL#B###z###YXGcj##", "d####ET#t#B#q##dA###HQ#", "#ZER###v#nfBp##a###te##", "##Q####b#B########L###Q", "##########oPy#X##e##J##", "D#j##RY###K#P##DqfN####", "#f##o#Qe##YQEjBL#c#w###", "pObU#Mh##H##d#tEy##p##t", "#########t####fehEk#BE#", "#N#lo######Y#l#Z#####D#", "R##w#EXu##H###V#L#w#V#U", "#b########KP###TP###PV#", "##y#WA##t##u#####e#W#Lh", "QC##p#yD#du#B##H##SU#I#", "#Pj####UoNhgC#MMP#rp###", "d####U##dYs##GbQl####a#", "##w#L##wc#######Sj##N#i", "s##Ad#N#ZAsn##p####e#Tr", "#pa###m##W#####i##G#W##", "####z##I##X###yc#B##ZX#" }

    Returns: 46

  65. { "###Wy#XT##sk#gt#rwJ#W", "v###il##mzE#f##GL#x#u", "Eh####JQLYWH###r##r#Q", "s###VQ#####ytn####qGr", "#P###k#A#####vtY#f##l", "#x#s##Fc#g#a####PP#x#", "GK###o##p#u##M#nD#bk#", "##B#NsY#k######nC#RK#", "wuk#PqGU####DnX##X#Z#", "QYzRZ###j#n####O##Wl#", "#cRrFNhB#K##z##G#Mu#T", "HxUElxV#W#####r#s#wjq", "###VROs#Qw#u##C#Y##s#", "W#N#YBmYzD#qP###N#vG#", "F#U##O##wU###X###P##N", "#RiQhmD#a##t#####S#gX", "V#H###o##gD####z##kSE", "lw#c#S#Tvm#v##cGS##nO", "v###azMnHHi#M###up#BL", "#Nk###l##e########F##", "##iPl#i#AXg#GjSU##h##" }

    Returns: 22

  66. { "AAAAAAAAAAAAAAAAAAAAAAAAy", "AAAAAAAAAAAAAAAAAAAAAAAA#", "AAAAAAAAAAAAAAAAAAAAAAAA#", "AAAAAAAAAAAAAAAAAAAAAAAA#", "AAAAAAAAAAAAAAAAAAAAAAAA#", "AAAAAAAAAAAAAAAAAAAAAAAA#", "AAAAAAAAAAAAAAAAAAAAAAAA#", "AAAAAAAAAAAAAAAAAAAAAAAA#", "AAAAAAAAAAAAAAAAAAAAAAAA#", "AAAAAAAAAAAAAAAAAAAAAAAA#", "AAAAAAAAAAAAAAAAAAAAAAAA#", "AAAAAAAAAAAAAAAAAAAAAAAA#", "AAAAAAAAAAAAAAAAAAAAAAAA#", "AAAAAAAAAAAAAAAAAAAAAAAA#", "AAAAAAAAAAAAAAAAAAAAAAAA#", "AAAAAAAAAAAAAAAAAAAAAAAA#", "AAAAAAAAAAAAAAAAAAAAAAAA#", "AAAAAAAAAAAAAAAAAAAAAAAA#", "AAAAAAAAAAAAAAAAAAAAAAAA#", "AAAAAAAAAAAAAAAAAAAAAAAA#", "AAAAAAAAAAAAAAAAAAAAAAAA#", "AAAAAAAAAAAAAAAAAAAAAAAA#", "AAAAAAAAAAAAAAAAAAAAAAAA#", "AAAAAAAAAAAAAAAAAAAAAAAA#", "#########################" }

    Returns: 51

  67. { "#A######", "##A#####", "###C##K#", "####B###", "#####B##", "##C#####", "#######A", "########" }

    Returns: 24

  68. { "#A#A##A###A#####", "##M#############", "###############A", "####E###########", "#####H##########", "###############A", "#######C########", "########G#######", "#########C######", "###############A", "###########G####", "############G###", "#############G##", "##############G#", "###############A", "################" }

    Returns: 30

    Fourth shortest is possible.

  69. { "#B#C##T#M", "##K######", "########A", "####R####", "#####U###", "########C", "#######H#", "########S", "#########" }

    Returns: 47

    Here we have four possible paths. The shortest one is 0 -> 8 and has length 13 which makes it impossible. The second shortest is 0 -> 1 -> 2 -> 8, but the segment 0 -> 1 -> 2 has length 13, which is impossible. The third one is 0 -> 3 -> 4 -> 5 -> 8, which has length 45, but the segment 3 -> 4 -> 5 is of length 39, which is divisible by 13 and makes it impossible. The fourth one 0 -> 6 -> 7 -> 8 is possible and has length 47.

  70. {"##c#X###", "oJD#####", "###Y####", "##p##ut#", "######H#", "##Nu#c##", "bS#####g", "#####QB#"}

    Returns: 227

  71. {"F###g##", "#nd#gJ#", "#crv#X#", "I#ES###", "chq####", "###u#sh", "TT##tnc"}

    Returns: 134

  72. {"Hm##j#", "D#H#XQ", "S#U###", "#R####", "###jd#", "##SJh#"}

    Returns: 107

  73. {"#####P####", "##fb######", "lBX####o##", "##########", "#########g", "###O####F#", "#####o#M#f", "##U###iqk#", "#cK#######", "a########A"}

    Returns: 296

  74. {"######L##", "#YO#s####", "###Nl#s##", "Qu#######", "##EM####B", "##G##K###", "##N###K##", "#r###K###", "###C#####"}

    Returns: 204

  75. {"####e####", "V########", "#########", "#f##z##x#", "###N#####", "#########", "#N#ma####", "####W#N#y", "LLK####W#"}

    Returns: 146

  76. {"###G#####", "C##H##VY#", "OW#OC##J#", "##W###P##", "###NK#Z##", "P#U##UF##", "#########", "O#P#MU##C", "####O#K##"}

    Returns: 135

  77. {"#####X###", "#QW#####W", "#Y###O###", "####EJ###", "###R#D###", "######RR#", "##X###G##", "#########", "J#O###C##"}

    Returns: 121

  78. {"S#####F##", "#U##E##K#", "##FQM##M#", "###R##J#F", "######S##", "G##I#O###", "#J##M#GH#", "#N###R###", "##Q#I####"}

    Returns: 99

  79. {"py", "Mb"}

    Returns: 51

  80. {"Bw#", "rtp", "JOw"}

    Returns: 137

  81. {"#j##", "FXpM", "RFil", "CUqL"}

    Returns: 175

  82. {"#w##", "KtP#", "#yYs", "mFus"}

    Returns: 181

  83. {"HL###", "#K#L#", "DK#GH", "#DIA#", "K#EI#"}

    Returns: 41

  84. {"K#########D##############", "###############KG####D###", "##IJ#I############EC#####", "###############H####E##L#", "#M#######################", "###C##EF#########K#C#####", "######F#############J####", "#L#D##M######H######M####", "####L###################B", "#######################B#", "#######K##M#####C###M####", "############I############", "######B##H##M###########I", "####J##########A######B##", "####EG###C#B#############", "###E################C####", "#########L###H##A####A###", "######B#K##L#############", "A###########G############", "BBG#############C#####A##", "###L#####################", "###B#################KEI#", "F###M#########I####H#####", "#C###G########A#####I####", "#####E#DH###############A"}

    Returns: 49

  85. {"######W##################", "T####F#################S#", "V######D#L############N##", "####G########H###########", "#######M##G##############", "###############G######J##", "#Q##########V########D###", "###############U##O#KH#O#", "T#####W#I#####L######V##Y", "#J########V####D####S#U##", "#####J########X######R###", "##############C######L#U#", "###############A#########", "##################N#P####", "#################G#######", "####W#O##############UJY#", "#################L###U###", "S####H##############K#Q#T", "U########O#########XQ####", "##T###E####M###G#T###C###", "########################R", "###################X#####", "#################P#D#####", "#L##D###############O####", "#G######################U"}

    Returns: 100

  86. {"########aS#########M#####", "#######H###t#############", "#####n###########T#pl####", "#############B#b#########", "#####B########O##P#######", "#Ze####C###D#############", "##########P##########m###", "#######L#################", "#E###################S###", "############o#######P####", "#####xq########N#########", "Q########hMw####n########", "####################X####", "#b###o######s##m##vT#JO##", "#########W###N###########", "###########D##X##########", "###L###I##O###########cp#", "#q#####B########i########", "###################AM###V", "#SAf##o####A##Y#########l", "#F##################a#j##", "###########b########k####", "#kl###X####U####E###O####", "###g##########rC#####i###", "#############Y##########c"}

    Returns: 250

  87. {"BauFSEvOOYklqydQHoyvOvDbZ", "CwEsFNaQDKfDPfmdjxponPPda", "pHAREHLdsxmNslgKAUtVKquDk", "IbHMzLGEuyqVLGbXbqkOwROaW", "YAIOLJDYrBgOfQxWxoIvlSVEf", "ZYUnFDTUdJDpGhExhDFQgWWGp", "DAigymFscLLjoBxhCLZYGfDnJ", "VxKVeEjJtFsPIQmwrHWbzDXpo", "CxODnrqNoKcKPsaVAtfmwBnjp", "XthXPwtssdbDSeRlFSyLDGWYN", "dMlihrPXXnfpyOSBjwxCOhqxb", "yYEuTmTvKISyHfUsuxpyTzEhw", "cZUhgIECyjkgBkoNLMyzYgvsw", "LGUUeKUcaeVkxbHCVSmEyZLws", "BfimaHoIhdidhdihXtoQmTyEm", "HRSUSiOknBCVZhCUrOuEOgqfK", "KVvgUGqVrtWddeNgugiIXbBYu", "eSnDxiehAkZvRhCOKUUBsqRjU", "aPKVxmAUbkQWkvRtoqWHvUXVc", "DasSJSPZOnGNkbwnBOuCcCtTr", "bTYCoGkOcrRiOnUZUdQerWrOd", "DixkadEStggbRbpYvHnaeKNfO", "CwoKVXtPeuwWCWRBEeGqFIIGc", "VsmXcDaniGAPxehtrUIfjxkqs", "HtiwWHEKvtLIkjDUNVsqsVKhm"}

    Returns: 22

  88. {"EM", "NI"}

    Returns: -1

  89. {"#EFa##j##RA#P##D##", "M##hDU#l###M##iGl#", "#####ai#Nf##Oa#RP#", "B###X##dA#####X#e#", "#jfM###J##HQ###H##", "###DY##CKDdMC###Q#", "#W###U#iH#Y#T##K##", "#WN####gZ#L##QE#C#", "Y##WM##NOd#H######", "####F#X####SSK#b#Q", "######kPX###Y##RT#", "##KcS##a##FP#####N", "YhG#S##aYKZI###YF#", "T#UB#TDdaIW######J", "#E#g##aSYh#d###MNU", "Q#K#S##O#ES#######", "G#I##b###Qe#j#H#WJ", "#Ik##N#H######Y#E#"}

    Returns: 31

  90. {"jgc#g#PQnfl#Bk##", "#OVeBIZaYbhmEo#N", "##POJha###FNo##c", "##nWal#bZ#QN##a#", "bBQUVN###MPfGhYo", "##HP#bfe#P#RaO#c", "#####mS##J#C###Q", "##H##RM#AhVcT##e", "UC##c#mL#mi#Y#O#", "B#C##i#S#aoWE##R", "cmg###I##QaZ#Wf#", "JAD##UcmPcFPGg#S", "Wda##GJd#PPebU#j", "WM#QmKM#PC###IUE", "JoEW#Z#GHjh#P##e", "#oKHgCM##kmTAQI#"}

    Returns: 29

  91. {"##XP##M####", "####FV#####", "####M######", "UKI####N###", "Z###B######", "#########Zj", "#k##I#C###I", "V##RCO#I###", "#L######H##", "Y######JN#W", "#######Y#MQ"}

    Returns: 85

  92. {"#i###########q#####U###", "#####################i#", "#######s############n##", "#X######D##############", "##############o##C###H#", "X#U#Z#################J", "#########A#############", "############F#######am#", "#M##f#################l", "#####N#####a##########F", "#J##o##N##pF###q######G", "##D####################", "#o####J######gB########", "h####f####i#j##########", "########W##############", "i##O#######I#r#########", "R##S###################", "#########V########l##J#", "####H#####E########c###", "###i##L##############g#", "########Q########f#####", "##h############n#######", "#Wh###C##Y#############"}

    Returns: 85

  93. {"fQI###", "D#E###", "#Z#l#M", "W###V#", "#Hl#RB", "##iIZ#"}

    Returns: 71

  94. {"##CB####B##C#########A###", "#C#A####CB#######C#A##A##", "A######A#B#C#####CC#C####", "#######C#C#B#####CC#B####", "#A#####C######BC#B#######", "###B####CB######C###B####", "####A#BB###C###C##B######", "B######B##########BC#####", "####C####AB########A#####", "B#CA#CA#A#A#####A###A####", "##C####A###########A#C###", "###A###B############CA###", "##BB##########BB####A#BA#", "A####C#C####C############", "#######C##B###C####B#####", "##A###C##C#C##########B##", "##B###A###AB#############", "##################C######", "######B##C###############", "#C####A####A#C##C###C#A##", "#C####B######B###A#######", "####A#B#C########B#######", "C###C#B#B#####B#####B####", "##C##############A###C#BC", "B#####BB#A#######BB##C#CC"}

    Returns: 15

  95. {"##PH###", "##ZEI##", "##CMaX#", "BJ#U###", "###U#GY", "QVAL###", "SW#F##a"}

    Returns: 67

  96. {"tmmOTk#", "#mkVLaS", "vaAWi#M", "#ROXf#w", "DUjyJqm", "Bx#GGd#", "xnu#UEX"}

    Returns: 60

  97. {"####D#", "####I#", "I#J#bI", "Xb####", "###C#i", "#g##Nb"}

    Returns: 79


This problem statement is the exclusive and proprietary property of TopCoder, Inc. Any unauthorized use or reproduction of this information without the prior written consent of TopCoder, Inc. is strictly prohibited. (c)2024, TopCoder, Inc. All rights reserved.
This problem was used for: