Circular Strings

Given two strings A and B, find out whether one of them is one of the possible rotations of the other string. First line takes an input T which tells the number of test cases. Each of the next T lines takes 2 space separated strings A and B. Output T lines where 'i'th line prints true if one of the strings is a possible rotation of the other string. Else, print false.

IN

100
MtlqI lqIMt
J VJMUYh
ZaAaMIsaT taElYSEk
nwo won
LhHGgqqf RfFb
h rcxx
wpS wpS
HEoEzB hJtxab
t y
IFt FtI
RYyPnSX ABde
ErJonJQoZ WZHhhDIrWH
LwjI ILwj
jopLTHXJwG Kh
i VpQaYhWh
HDjpP HDjpP
dioyr JN
KxAY jwxZw
IteIak IteIak
B ugvkFp
QcqdcRbkCZ CwJMrp
Tz zT
aE h
uoQseT JxbnHEmsI
buBrTvskk TvskkbuBr
ucSPSIJyd iAVvJzjc
uFdVWXSphF yZO
q q
ZGgTOiqLS VwyR
doAC PmMBKn
CEVEDBKY DBKYCEVE
ofnFaJ RmJgMl
BxdcJSrNwO CScAmxr
KWUVCniNVU KWUVCniNVU
YAp jiUzgkRIE
LQvcKf EDcRL
NF NF
fsRI BCCHoVSvTD
ohxVHD mXLDm
XNYR YRXN
VHKZRBx WS
Jgx DeKESH
wTiVHJNN NwTiVHJN
XaL diB
apII rOscsNljj
UGQD DUGQ
SDcu sxZTwCKHkY
ATCSGqE Xy
pbTuvw wpbTuv
nTPnNOPZv YV
tyw Oa
nyr rny
kaxjZP TEJiUah
CHlgClCdBD qDPuFBuEKW
hr rh
zuVilxs DwjHAmk
Cq WxQ
bAPWjg gbAPWj
hrZRfwjdB PiIbVhE
wA OtN
i i
Q GXcFPhD
kGIZOSb ahYYHK
DxeLkGC kGCDxeL
bvRQCWToC orWReyYFwh
KKpqYzXA jdPDwTz
icsYVQrZoR oRicsYVQrZ
Y yJLPHMoJh
My iUcZceU
ZKvABmfpk mfpkZKvAB
TOH AVLjUaI
iCzKgDEk QFETRlj
obxEIbff fobxEIbf
ZpyYZax ICnSiGxN
oAISrlpVTq Y
tAwt tAwt
uyfcaVVjB y
j lbt
SpSKt SpSKt
oSoITKc sGTPdcqYcS
fFmyEG wqJq
XjZhElL LXjZhEl
sO XtMxXhgcM
B AQoRzhB
qcgwQSrVMH MHqcgwQSrV
aeJY rCYmdQMUHf
qjUiNDEDvV JCRUfVDFJV
jhlBvHKB jhlBvHKB
mZiZe DbHEKMX
tuiAdFH o
OJbyMgzYH byMgzYHOJ
LWdMfHY gCMAmm
t sHsgrWhdc
Elrey reyEl
kt KMw
b bPcuN
EgdVcMAGUG VcMAGUGEgd
K bt
uJ JHzm
cbiZP biZPc

OUT

true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true

IN

100
UGzXx I
pSY VxpFfC
eWmE KuBCWGr
msplJYJAQ splJYJAQm
njASQEkU YaI
uLNSreIfY rHyChQM
dVWyn khC
hlV Vhl
I Qohxm
OwfrfV CA
yAqBmadX QSlpcK
SReeyvcfoK yvcfoKSRee
mc KfrNrrtoa
IO majeRQLpN
Wbxywl xyhqlbj
RLq LqR
So EtSW
JJtFKtd EIHcPzQ
IWkuOmvHA NvRJzBsvIE
oOwWw wWwoO
VRGgNQcCEZ eYaAQJ
TDydhO xlnTmdrF
Zsbb FaJJBJLTU
oxnrgEJEPy rgEJEPyoxn
BSiM cNub
XKcyWpr eFQsyyW
cniEslwcYQ LkHehsIhQ
aiEF EFai
GZupDHxhB gDLyHY
REs mbBMcJSj
OPLKfQT A
pGX XpG
gBQXf IUMjGOv
XhO uaSkTWKn
SMqySRR XZaRnMZbJ
ZspMMpgy MpgyZspM
L sflJgd
Xvx YQMKPNtqM
FaZUgx LKddQoMWU
TROrPFdbWt PFdbWtTROr
fHSIip ivDSz
IpVEjmZDbr GWWepSr
ckhk xswD
xkvN kvNx
yUBbxuWFT JKmbjQNqb
q kTIIFG
OKvkNZHKxm RyPFbZwORZ
h h
afyhnXW VgmUOW
CbKCRR snrjmXrJOT
ObD zcHFodVNy
OKC KCO
IzrB Dz
O veDYjpZl
hcd rBEHN
Pp pP
GSzLr AgBEKzOB
BCif kwJrew
vnrlTLn FQ
LrNXtBzuFb NXtBzuFbLr
iohthls iF
tbM irZrE
eCliDhN lxQcEkjre
zJTv zJTv
DWyC dvUhicKS
sdmiHtUR YKMkfhw
mVLPKq E
UiJMXDsMMZ ZUiJMXDsMM
QThchri NvdIISVZg
Ya kph
jvbick yrfFInwX
biTvduB vduBbiT
d eUwudRX
wJpUaubkk KuauPvxj
deCsKwOGA EoDnfZ
z z
l miDGXAF
ZJpdbB riByor
B DTygw
JItmRT RTJItm
enH qkws
EvCu gWLl
LsNXbwqPPL NPrX
jJJBl JJBlj
NkmvgzGx YliBja
AMW dP
qYwZcjOBy pTGOzGBat
Be Be
EYqtDfI FGSHrjKPJB
SqJyRlR NVpJbP
WUGEOl i
dTHuDj dTHuDj
bovuzOZO QxmF
iAg QUDYRHuy
XjiUkw hx
gOQXNE gOQXNE
ogufWoJxf RgT
pbkcZbj GppYOc
vqQ LWaZFZHxsN
Icwue eIcwu

OUT

false
false
false
true
false
false
false
true
false
false
false
true
false
false
false
true
false
false
false
true
false
false
false
true
false
false
false
true
false
false
false
true
false
false
false
true
false
false
false
true
false
false
false
true
false
false
false
true
false
false
false
true
false
false
false
true
false
false
false
true
false
false
false
true
false
false
false
true
false
false
false
true
false
false
false
true
false
false
false
true
false
false
false
true
false
false
false
true
false
false
false
true
false
false
false
true
false
false
false
true

IN

100
ZsMOOtzXWVAypfmVTmhFnCTyvCywfVkenyuDRUdqrfOiMCdGOklcpeAKHZJowTsKsNPLjSbcYrkKToqIy WVAypfmVTmhFnCTyvCywfVkenyuDRUdqrfOiMCdGOklcpeAKHZJowTsKsNPLjSbcYrkKToqIyZsMOOtzX
NiMarnJFKCzWwOLiX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ddVwxefkcPvgMVVkKjtfHXxWcTtpSecViXrFDwPFlMLAHHKTKANWiG
ZZDwVFRpUJVyEdvxJYUafHpshyBusTZrTCpqhIhDrdbxgYwrWqUDAjWjHZDZTfqoHhErPMUIryfxwertulyw WibWnDPsTFaDjTsxNbOlImIMfDJqDHKAPnYdQpvmUXPdQJBgKRTVddHKGSaMAmOpAMUSbqGVPvAGf
orvhOalwLtQnfqATiChcuiUbFKYISFlgzi nLClwWclDULxcPEHMpBpwNnehvSPwCFJnhVlFzxjtKGYAMFmDIBawqefnyVJbAVQjscPRzYMLgKluRZYccAatg
iFauiApYmHababBoNjZADsAduCDuxmAGRcCBDRzracsaFvoUEPvJKxpGBubZGdhxHJAkcadcEXcLsSGyID EXcLsSGyIDiFauiApYmHababBoNjZADsAduCDuxmAGRcCBDRzracsaFvoUEPvJKxpGBubZGdhxHJAkcadc
CZYdtBEagLZOWAAYcECGBETwxzwHEgBgfzMzDqzlEyZAYcbaGDiJKcHJdeSkktqqucrXVQjzQKZPMCrUIcgUGpDltvvgqoY SpINftmVdOmsSgOciUWqkbBfwzlMpjZhyHxfClbhZPzuVowFKtxUuBataNHpzGYXP
FrHGziXACTOBazUyVQZxjBltsKZSjPoOIxWhhU KpYlRZHRxxsUjTHCNTdGdSU
dTqMaMWmbxZuYimvGEqryzTNtWtwrPPWIHIltFxWcZrChDYNhQGhpbVIYoeRewNodvzxCztg hDYNhQGhpbVIYoeRewNodvzxCztgdTqMaMWmbxZuYimvGEqryzTNtWtwrPPWIHIltFxWcZrC
JFnHVXZBeoDZXdoDwUZLi IkclJXTJkeoZLLWmnbBsayXQbtKDGvioFMzQlVzvZpvnbrzQUaKVaHLECYhitRwYfyqq
PMseJhHaHxVjhskqFOSDxaWoZwVxolsdzmKiurLDriMyAWPfmjlJMJzLIuKWicCHomQkfBNwJAVLYmslvDwh WuxSetaIVIzJyJPBZlkbIxZUPMStjBKHyhzCcclAmKjKVYNUMzVuWxRLjlGUMq
kZDpchcCtMnFjmseY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onjhGRPqHaswPDURDofb TuAjxSXinExcNglExdOywknBeeGUMkFFEfPbXojMviPKQapoFFobPBevhLpvVVDbCscAiNmDyDooffeLKUozvV
fiLcdGFGjXIlIXZlXfzOkgSxQNoRKLn XfzOkgSxQNoRKLnfiLcdGFGjXIlIXZl
ZuyhZeSzodhNdULiWzUcTUvGKOTvEkofgMmIsfhGKQtpmGZifUNZqihayaXcNlJvzWdtDMZPeUfrBeziAm sWpsvRRZ
cJCdhhw UXbAugRxNTFnHpiEEABXUceyLiCupAGLyIOuqFRFaYvIn
OtFprzTXYhHAByCikCsYWkfpQIolqBOeVtVOvOntVUvxsXhecbEYlKQDseOkheQEaLsvbFOXzjWuIF QIolqBOeVtVOvOntVUvxsXhecbEYlKQDseOkheQEaLsvbFOXzjWuIFOtFprzTXYhHAByCikCsYWkfp
GdltpbXjHntOsjtswnpxTdWUOSoYZplFswBjZysGn WFYpzufOtYtquJKlIKATRuRsDssVYGiwNIoPctDvTzLniwasIANzUgSxyMUYsEvImlxQECmxbzmMxnGfpWhMcBLdnG
ikYQZLPPprDoVFdjESrmhntvSUhVhNyRzZjaKYQCSVsNAvyHPPTXFmUZIb rqUjQvsQIrikLGCagAyppPiOWuJVcmruDOftjxLtqwDDcIDKKDaZtiqpfZNJleFqSKJEKXXCtdgXLJjXnjWiUOZBpMkBtsRNEdr
CRtxUbuhmDebpCjjrLKGZwJUOdItIBjkseHOfDxsIBVXGfIzsUfTrrOHWYCEzoquszKycismlnMRUWSORAIKRYT rLKGZwJUOdItIBjkseHOfDxsIBVXGfIzsUfTrrOHWYCEzoquszKycismlnMRUWSORAIKRYTCRtxUbuhmDebpCjj
wTvKjrcIccmkWaXMMPiJHXchhoAfhPbDkwPtquDsw eVsbHGsPRCoTlvhMApdBuoAkjQgpKe
OZArihKYYOOuZkBnKsTOphobSGhhSlqGlQztzLTazkubuVoGQ ufQkglsPskaksNbuJcfechowiIUYRKgNryYZJSOEdOOX
rrNux rrNux
ggvoqpmhBUVSVvREPh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bQmsMkpFOTTUuFTPskXIybkjtdsRTqNVgZPSjGyz
aoNjIQdzmuOhANyVz tAFOwDmmTg
gIOuXXcqbdCvRlxhJsGOngVbfbnrUVHagvudsZVVcxqwkqDUILkWtgXyJNrDkYDqtzuoy jdpc
zscVCNgagOAhZPyCZZHqsgmihBsMsWluoPpseXVMnvTmkUqLTXbNGnWprQblMO seXVMnvTmkUqLTXbNGnWprQblMOzscVCNgagOAhZPyCZZHqsgmihBsMsWluoPp
DxUjWrVkMrYylpkeONtWbplUfOftCLVHKsQGJMsYdrwQiiwWWPvXHGtovyIXLDhvxXEhJWfoPdezmcYiStHzZaNWa wMdDJAAnjMMoCdUjDglBQd
xevZusZrqnuTXxVMGjyxMCrVfxIiPoEOsZNoToGjCCEbBApiJOFvSWSzVBHmPlaJMNY DgPHkuIMwYwfobdIzxhWAqiRdidrxDXalpkvlSJjsfoiITQJTzFVrpNWZQowtlZgcjBPDNYyuPGFIZodawZsLMoneCJZq
fUtiKzV tiKzVfU
SxfxIennfJmZXAPkgUvfkGMGBVqasBXkAdjKJxYOIkpFnfrtZNbLVNTwIkxDnWpNZzyJyY giRoXWhrxUsKrfDOqpNTCJiSljSw
QvqAmEyKLrJiltzqXPimebrOMLBVfXfxUvXJBXVmoFWbYYUxpcmuGfKsQlPxKU EpRPQrLFhqdjobdoTfAnnFXFXKXuWRoAJfqbYDigTmpJPsXIZxxncWuZirteLjhuRZXPCgVvUMelecUGzTTeQnFYhBdSKMOBLLr
tOIPBMbhqVNQqiwgYbHfem MbhqVNQqiwgYbHfemtOIPB
YPSJcLWwAElDSOmjJCBaKXIkApRFBqWbHO KAGICMvfFkrOv
pXgOGqoxivBarCkIPUKvem zTNlkdjGsgogoEWoosPRlTbvIxfGBrOCM
OzgXfaFtIUzE IUzEOzgXfaFt

OUT

true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
Login to submit solution


95 symbols python2 failed test 1 Wrong answer
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
true
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
instead of
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
Wed Sep 23 15:50:52 2015 Shubhang Sati
t=input()
while t:
 t-=1
 a,b=raw_input().split()
 if b in a+a:print "true"
 else:print "false"
87 symbols python3 failed test 1 Code error

File "./code", line 1 input();while1:a,b=raw_input.split();print("false","true")[len(a)==len(b) and a in b+b] ^ SyntaxError: invalid syntax

Wed Sep 23 19:45:36 2015 PFischbeck
input();while1:a,b=raw_input.split();print("false","true")[len(a)==len(b) and a in b+b]
88 symbols python2 failed test 1 Code error

Traceback (most recent call last): File "./code", line 2, in <module> while 1:a,b=raw_input.split();print("false","true")[len(a)==len(b) and a in b+b] AttributeError: 'builtin_function_or_method' object has no attribute 'split'

Wed Sep 23 19:49:35 2015 PFischbeck
input()
while 1:a,b=raw_input.split();print("false","true")[len(a)==len(b) and a in b+b]
90 symbols python2 failed test 1 Code error

Traceback (most recent call last): File "./code", line 2, in <module> while 1:a,b=raw_input().split();print("false","true")[len(a)==len(b) and a in b+b] EOFError: EOF when reading a line

Wed Sep 23 19:50:33 2015 PFischbeck
input()
while 1:a,b=raw_input().split();print("false","true")[len(a)==len(b) and a in b+b]
93 symbols python2 failed test 1 Code error

Traceback (most recent call last): File "./code", line 2, in <module> while t:t-=1;a,b=raw_input().split();print("false","true")[len(a)==len(b)&a in b+b] TypeError: unsupported operand type(s) for &: 'int' and 'str'

Sun Sep 27 17:50:17 2015 Sait2000
t=input()
while t:t-=1;a,b=raw_input().split();print("false","true")[len(a)==len(b)&a in b+b]
89 symbols python2 failed test 1 Code error

Traceback (most recent call last): File "./code", line 2, in <module> while t:t-=1;a,b=raw_input().split();print("false","true")[len(a)==len(b)&a in b+b] ValueError: need more than 1 value to unpack

Sun Sep 27 17:50:37 2015 Sait2000
t=100
while t:t-=1;a,b=raw_input().split();print("false","true")[len(a)==len(b)&a in b+b]
91 symbols python2 failed test 1 Code error

Traceback (most recent call last): File "./code", line 2, in <module> while t:t-=1;a,b=raw_input().split();print("false","true")[len(a)==len(b)&(a in b+b)] ValueError: need more than 1 value to unpack

Sun Sep 27 17:51:03 2015 Sait2000
t=100
while t:t-=1;a,b=raw_input().split();print("false","true")[len(a)==len(b)&(a in b+b)]
92 symbols python2 failed test 1 Code error

Traceback (most recent call last): File "./code", line 2, in <module> while t:t-=1;a,b=raw_input().split();print("false","true")[len(a)==len(b)and a in b+b] ValueError: need more than 1 value to unpack

Sun Sep 27 17:51:57 2015 Sait2000
t=100
while t:t-=1;a,b=raw_input().split();print("false","true")[len(a)==len(b)and a in b+b]
92 symbols python2 failed test 1 Code error

Traceback (most recent call last): File "./code", line 2, in <module> while t:t-=1;a,b=raw_input().split();print("false","true")[len(a)==len(b)and a in b+b] ValueError: need more than 1 value to unpack

Sun Sep 27 17:52:57 2015 Sait2000
t=100
while t:t-=1;a,b=raw_input().split();print("false","true")[len(a)==len(b)and a in b+b]
87 symbols python3 failed test 1 Code error

File "./code", line 3 t-=1 ^ IndentationError: expected an indented block

Wed Oct 7 20:19:33 2015 BogdanShevchenko
t=input()
while t:
t-=1
a,b=raw_input().split()
print bool(len(a)==len(b) and a in b+b)
86 symbols python2 failed test 1 Wrong answer
True
False
False
True
False
False
True
False
False
True
False
False
True
False
False
True
False
False
True
False
False
True
False
False
True
False
False
True
False
False
True
False
False
True
False
False
True
False
False
True
False
False
True
False
False
True
False
False
True
False
False
True
False
False
True
False
False
True
False
False
True
False
False
True
False
False
True
False
False
True
False
False
True
False
False
True
False
False
True
False
False
True
False
False
True
False
False
True
False
False
True
False
False
True
False
False
True
False
False
True
instead of
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
Wed Oct 7 20:21:23 2015 BogdanShevchenko
t=input()
while t:t-=1;a,b=raw_input().split();print bool(len(a)==len(b) and a in b+b)
82 symbols python2 failed test 3 Wrong answer
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
true
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
instead of
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
Thu Oct 8 13:33:07 2015 BogdanShevchenko
t=input()
while t:t-=1;a,b=raw_input().split();print("false","true")[b+b in a+a+a]
77 symbols python2 failed test 1 Code error

Traceback (most recent call last): File "./code", line 2, in <module> while t:a,b=raw_input().split();print("false","true")[a+a in b+b+b] EOFError: EOF when reading a line

Thu Oct 8 13:56:02 2015 BogdanShevchenko
t=input()
while t:a,b=raw_input().split();print("false","true")[a+a in b+b+b]
80 symbols python3 failed test 1 Code error

Traceback (most recent call last): File "./code", line 2, in <module> while t:t-=1;a,b=raw_input().split();print("false","true")[a*2 in b*3] TypeError: unsupported operand type(s) for -=: 'str' and 'int'

Fri Oct 9 15:25:15 2015 BogdanShevchenko
t=input()
while t:t-=1;a,b=raw_input().split();print("false","true")[a*2 in b*3]
44 symbols ruby2.0 failed test 1 Code error

./code:2: syntax error, unexpected '(', expecting end-of-input $_=$n++?/(.+)(.+) \2\1/?"true":"false":"" ^

Fri Oct 23 01:03:10 2015 vakorol
#!/usr/bin/ruby2.0 -pl
$_=$n++?/(.+)(.+) \2\1/?"true":"false":""
46 symbols perl failed test 1 Wrong answer
true
false
false
true
false
false
false
false
false
true
false
false
true
false
false
false
false
false
false
false
false
true
false
false
true
false
false
false
false
false
true
false
false
false
false
false
false
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
false
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
false
false
false
true
false
false
true
false
false
false
false
false
true
false
false
true
false
false
true
false
false
true
instead of
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
Fri Oct 23 01:04:28 2015 vakorol
#!/usr/bin/perl -pl
$_=$n++?(/(.+)(.+) \2\1/?"true":"false"):""
44 symbols perl failed test 1 Wrong answer
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
true
true
false
true
true
instead of
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
Fri Oct 23 01:08:53 2015 vakorol
#!/usr/bin/perl -pl
$_=$n++?/(.*)(.+) \2\1/?"true":"false":""
44 symbols perl failed test 1 Wrong answer
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
true
true
false
true
true
instead of
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
Fri Oct 23 01:42:30 2015 danieljabailey
#!/usr/bin/perl -pl
$_=$.-1?/(.*)(.+) \2\1/?"true":"false":""
45 symbols perl failed test 1 Wrong answer
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
true
true
false
false
true
instead of
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
Fri Oct 23 01:43:06 2015 danieljabailey
#!/usr/bin/perl -pl
$_=$.-1?/^(.*)(.+) \2\1/?"true":"false":""
84 symbols bash failed test 1 Wrong answer
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
instead of
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
Tue Aug 16 23:14:21 2016 hidefromkgb
b=`md5sum`;while((++i<99));do sed $'/0/ctrue\ncfalse'<<<$[${b:2:1}?(i+1)%3:i%4];done

View all solutions