Facebook Hacker Cup (INPUT/OUTPUT)

INPUT
20
5 mybea zdr yubx xe dyroiy
9 u ufmu ufmuqfy vmc ufm uqfy z vmcu qfy
9 vkzzfgtobz i tkczlqaf peqmnyoh eogzpbe bgorlllxor bkkupvnqr gsr xfqmteh
9 m xmnz mlk vlk lk iwkf lkiwkf vm v
9 nnozzwtf ahkjj wtp t sj htawm ihw egzinwju vn
9 r wwwr ndtc ndtclp lpb b wwwb www lp
9 s minpax ax zit cyax zitax minp zitaxminp cy
9 a yncoklkc ek yyfqebh je edzhujjc gpmb ktqimdtw opka
9 ld r d lo rlo rlol l rd ix
9 eavcqvv wyuh mkfq not evhlpur eidqnartht pesgphnnlq t ztvu
9 i hsmh hsmheh xgi eh xg xgeh xnfc ihsmh
9 rgh woqg dmabatgbt qrvpcrx eluunoi sy w wnthqxgkg aimallazuc
9 qxwd bejf wfaua rvkorigcm psdflr utgcsj iaolpoazv hmzczeg hqktnql
9 c evaxdeyrxb rhhfmdm xq vxedern diqs tpdofbc rbq kbxdy
9 wjxwgm qdhmzkmpzv uhibo gcikegpzv ceqiwekdx rxegvkc ujjvbv kfit peiawyk
9 k itqsgpwze ma yhpncg xtf w m kahula zgbo
9 dcn csmzj krnc vkcoume wvpva yqoexwujwp v cxepgptf xb
5 jibw ji jp bw jibw
9 izqht h qpbdayaifl pjsoie sujccnm umj dralemrspo euswuti m
9 krqeokrq weo usau krqeo eo zltg krq w zltgkrq

OUTPUT:
dyroiymybeaxeyubxzdr
qfyufmuqfyufmuufmuqfyuvmcuvmcz
bgorlllxorbkkupvnqreogzpbegsripeqmnyohtkczlqafvkzzfgtobzxfqmteh
iwkflkiwkflkmlkmvlkvmvxmnz
ahkjjegzinwjuhtawmihwnnozzwtfsjtvnwtp
blplpbndtclpndtcrwwwbwwwrwww
axcycyaxminpaxminpszitaxminpzitaxzit
aedzhujjcekgpmbjektqimdtwopkayncoklkcyyfqebh
dixldlolrdrlolrlor
eavcqvveidqnarthtevhlpurmkfqnotpesgphnnlqtwyuhztvu
ehhsmhehhsmhihsmhixgxgehxgixnfc
aimallazucdmabatgbteluunoiqrvpcrxrghsywnthqxgkgwoqgw
bejfhmzczeghqktnqliaolpoazvpsdflrqxwdrvkorigcmutgcsjwfaua
cdiqsevaxdeyrxbkbxdyrbqrhhfmdmtpdofbcvxedernxq
ceqiwekdxgcikegpzvkfitpeiawykqdhmzkmpzvrxegvkcuhiboujjvbvwjxwgm
itqsgpwzekahulakmamwxtfyhpncgzgbo
csmzjcxepgptfdcnkrncvkcoumevwvpvaxbyqoexwujwp
bwjibwjibwjijp
dralemrspoeuswutihizqhtmpjsoieqpbdayaiflsujccnmumj
eokrqkrqeokrqkrqeousauweowzltgkrqzltg

3 comments on “Facebook Hacker Cup (INPUT/OUTPUT)Add yours →

  1. Hi,

    Well.. even though I agree with your response, I have a few concerns.

    Lets take the 6th wordset:

    9 r wwwr ndtc ndtclp lpb b wwwb www lp

    Your result says that the words are ordered in the following manner (taking the first three only):

    b lp lpb

    However, according to the sample output at facebook’s page, the words should be ordered as

    b lpb lp

    i.e. the smallest word should come at the end. Did you by any chance notice that in the response?

    (Specifically I am referring to the following wordset in the sample:
    Input: 5 jibw ji jp bw jibw
    Output: bwjibwjibwjijp)

Leave a Reply

Your email address will not be published. Required fields are marked *