QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#465231#8679. Tilting Tilesucup-team3552#AC ✓570ms7992kbC++203.4kb2024-07-06 19:10:142024-07-06 19:10:14

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3632kb

input:

5 7
..g....
.......
h.i.j.k
abcde.f
..lmn.o

hbgdj.k
a.ime.f
..c.n.o
..l....
.......

output:

yes

result:

ok single line: 'yes'

Test #2:

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

input:

5 7
..g....
.......
h.i.j.k
abcde.f
..lmn.o

g......
.......
hijk...
abcdef.
lmno...

output:

yes

result:

ok single line: 'yes'

Test #3:

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

input:

5 7
..g....
.......
h.i.j.k
abcde.f
..lmn.o

.......
..g....
..i.j.k
h.cde.f
ablmn.o

output:

yes

result:

ok single line: 'yes'

Test #4:

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

input:

5 7
..g....
.......
h.i.j.k
abcde.f
..lmn.o

......g
.......
...hijk
.abcdef
...lmno

output:

yes

result:

ok single line: 'yes'

Test #5:

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

input:

5 7
..g....
.......
h.i.j.k
abcde.f
..lmn.o

......g
.......
...hijk
.abcdfe
...lmno

output:

no

result:

ok single line: 'no'

Test #6:

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

input:

8 10
axudxmgb..
rpyvs.....
fozux.....
xnve......
hx........
t.........
c.........
..........

cxvgxpea..
toyur.....
dnzvx.....
xmuh......
fx........
s.........
b.........
..........

output:

yes

result:

ok single line: 'yes'

Test #7:

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

input:

9 7
kbi...b
....mm.
.c.fc..
...j.k.
..f..j.
m....f.
.igl.fl
.g...a.
...f...

k.j....
am.l...
.....ib
..i.m..
..gg.c.
.....ff
.mf....
jf..f.k
cl..b..

output:

no

result:

ok single line: 'no'

Test #8:

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

input:

5 6
iyazl.
bzxf..
yzxe..
czdzzy
j..yk.

jyfziy
azxez.
yzxdl.
bzcz..
ky....

output:

yes

result:

ok single line: 'yes'

Test #9:

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

input:

5 6
iyazly
bzxfz.
yzxek.
czdz..
jy....

kyfzjy
azxez.
yzxdi.
bzcz..
ly....

output:

no

result:

ok single line: 'no'

Test #10:

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

input:

3 3
...
.a.
...

...
.a.
...

output:

yes

result:

ok single line: 'yes'

Test #11:

score: 0
Accepted
time: 59ms
memory: 7848kb

input:

500 500
abababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab...

output:

no

result:

ok single line: 'no'

Test #12:

score: 0
Accepted
time: 54ms
memory: 7736kb

input:

500 500
abababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab...

output:

no

result:

ok single line: 'no'

Test #13:

score: 0
Accepted
time: 25ms
memory: 7600kb

input:

496 495
oanhdonngaokopboqljdalgpfdeqfelhjchogdmrcaqb.ooogggggicgenlbipaprnfbcrapabfjaemrhdelojgbldirmidgihpjfobgopinddhhmacjcqljgajndcgemiepgipqmdgcqndqadkialgjddpkdfhamldedgrejbbgirpmbeqjc.mbipndabllbjbgrlbrhrcaiphrpogicjdcqeqdhdldpefdekqqihifhagjokepbbceqprongafeqmhbripqceodmfaecpgnaenfjjrjbbabaec...

output:

yes

result:

ok single line: 'yes'

Test #14:

score: 0
Accepted
time: 32ms
memory: 6508kb

input:

367 490
ababbaabbbabbabaabbabbbabababbbabaabbbabbababbabbaaaabbbbaaabbbbababaaaaabbaabaabbbabbbbbababaaabbabaabbaabaabbbabbbbabbbabbabbabbabbbababbabbaaabaabaababaaababaabaabbbbbaaaaabbaaaaabbababaababbaabaabaaaababbbbbaabaaababbabbbbaabaabbabbabbbbaaabbaaababbbaaabbbaaabbbbaabbaaabbbabaaaaaaaaaabaa...

output:

yes

result:

ok single line: 'yes'

Test #15:

score: 0
Accepted
time: 570ms
memory: 7896kb

input:

500 500
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii...

output:

yes

result:

ok single line: 'yes'

Test #16:

score: 0
Accepted
time: 20ms
memory: 7992kb

input:

500 500
tztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztztz...

output:

yes

result:

ok single line: 'yes'

Test #17:

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

input:

2 4
.xxx
..xx

xx..
xx..

output:

no

result:

ok single line: 'no'

Test #18:

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

input:

5 8
........
........
.aaaaa..
........
........

........
........
........
........
..aaaaaa

output:

no

result:

ok single line: 'no'

Test #19:

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

input:

5 8
........
........
.aaaaaa.
........
........

........
........
........
........
...aaaaa

output:

no

result:

ok single line: 'no'

Test #20:

score: 0
Accepted
time: 61ms
memory: 7800kb

input:

500 500
fwizgbybbgxihqejzkgyvdcrgzkfhfktchdilsfgigilfktykliwrykymilrmjjmrlimykyrwilkytkflihifguljdhctkjhgkzfrcdvyfkzfexhxifbbybgziwg...........................................................................................................................................................................

output:

no

result:

ok single line: 'no'

Test #21:

score: 0
Accepted
time: 59ms
memory: 7656kb

input:

500 500
hkmkgolmmlokbyyeohmmvmkhbpgmmkypmbmkmhcqvcbkkkbkbbkkwkkobrrdjkjgelllvclldgcvlddxclxvhvwlglkxsxklglwvhvxlcxddlvcgdllcvlllocaxaarrbokkwkkbbkbkkkbdvzkkmkmbmpykgmgpbhkmvgghoeyybkolgglomkmkh..............................................................................................................

output:

no

result:

ok single line: 'no'

Test #22:

score: 0
Accepted
time: 52ms
memory: 7552kb

input:

500 500
xueftjjjxjyzctkjocmokbkomcojktczyjxjjjtfeuxexumbooocaoljckojectkrketulbzlejoxoloxojelzblutekrktcejokcjloacooobmuxexueftjjjxjyzctkjocmokbkomcojktczyjxjjjtfeuxexumbooocaoljckojectkrketulbzlejhxoloxojelzblutekrktcejokcjloacooobmuxexueftjjjxjyzctkjocmokbkomcojktczyjxjjjtfeuxexumbooocaoljckojectk...

output:

no

result:

ok single line: 'no'

Test #23:

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

input:

1 6
..h...

h.....

output:

yes

result:

ok single line: 'yes'

Test #24:

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

input:

5 7
...sr.k
.pits.t
..gss.m
q.hubko
..xi.bb

.....sk
...okbi
...mssu
..trsgx
qptihbb

output:

yes

result:

ok single line: 'yes'

Test #25:

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

input:

4 2
.e
..
..
..

..
..
..
e.

output:

yes

result:

ok single line: 'yes'

Test #26:

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

input:

9 10
..........
......f...
..........
..........
....k.uo.k
..........
..........
......k...
..........

......kfok
.........u
.........k
..........
..........
..........
..........
..........
..........

output:

yes

result:

ok single line: 'yes'

Test #27:

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

input:

5 10
.n.n.icfbl
.c.hb..kkj
.l.dd...cg
.b.bh..bge
lh.j..ikpb

cifl......
nikkb.....
bdhbcg....
nhdbkgj...
lcbljhpeb.

output:

yes

result:

ok single line: 'yes'

Test #28:

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

input:

186 354
b....c....b..c....c....a...cb.a..aaa.....aac......c......aa..a....b....aaa.ca..c.a...bb..c..bcbb.bccaaa.a.a..c......cc.a..aa.abab.b.ba....c.c.bba.ba.c....cc..aa....ab..abb..c.a.b.c......b.b.a...cc.cb..c..b.....ac.c..a.cb.c.bbb......b..b.a...caab....a.aaccabba..a...aac..ccbab..a....b....a.a.....

output:

yes

result:

ok single line: 'yes'

Test #29:

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

input:

10 49
.kfmb.inlmmeeqj.mmgldemgoiklmm..gbgmm.lflmfpillmm
dmmaj.okllj.bhojoj.dklpkbohjoenqjjlkp.ohqjodaecdq
.oekcjhoalrhkpk.fdhlmbjrjoired.ocbrdo.qrmjlkobk.m
.mdbjol.l.m.rcn.jq.aqi..lqckgm..h.qemcipfdhkodc.i
.rlokjoei.m.bbpnoj.lik.akfjroek.i.iff.qbrndojaa..
cmafo.o.dhe.dkn..k.kfomkajoag.aaehh.m.eigdok...

output:

yes

result:

ok single line: 'yes'

Test #30:

score: 0
Accepted
time: 24ms
memory: 5692kb

input:

493 266
....gg..d..e.ff..f..bhaa.d.....c...gidee...e.i...e....dch.....a.g.ebb..cce.fe.cbhi.f.....i..c.c..d.........b...c........e..bd..fidd..ic..g.e.a.icacb..bd.id.c.fi..cdhfd..i..a...gde...gg...agd..cbi..c.g...c.g..i..b.dh..d...id..c.i.....bh.id.fbaa..fc.f....a.h...ediaggf
c...hcaaba...iggcgf.i.fea...

output:

yes

result:

ok single line: 'yes'

Test #31:

score: 0
Accepted
time: 23ms
memory: 5196kb

input:

255 381
ub........d..p...............l..kk..s..nd.....i.vx.lu..tx..y.n.m.....f..b.q.yc..t...f.....throlw.o.n..g.dn....rby.y......y.a.i..n...e.if......m.f..eg.i.q.....na.....nq..aaw.r..bfi..a.sb.c...bon.o..t....ab.up....e.rw.o.mt.....i...hs..lkj.iewb...oqn.f..u.b..q..i..q..rp....c..b.ptq..l...ks.q......

output:

yes

result:

ok single line: 'yes'

Test #32:

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

input:

183 61
...abaa.bbcbcbcacbacaacccbbbaaaaababcbbcbcbac.cbabaabbbc.bbca
.....abcbab....ccc...bbacc.cccc.c..ac...aba.aab......ab...cc.
......c...b.........c..b..b.......b........a........b........
...abc..ca.bb..bca.b.cb...cc.a.bcbacba..c.b.c.b...c..c..b..a.
................................................

output:

yes

result:

ok single line: 'yes'

Test #33:

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

input:

500 500
j...p....hk....wiwo..k...b..p...n...y...g.............og..h..q.h..l.....p....f.....y..rji.....j...r.a....t.d.......mwvv..j...lxn.....b...mc.....l..x.r.f..d.......n...v..bnv...f.f..d..v.....j.....f.......w........qrce....k.w..t.k.........v...ke.hg...w....t..j..p.....x......wk.dw..qgnyr.v..na....

output:

yes

result:

ok single line: 'yes'

Test #34:

score: 0
Accepted
time: 23ms
memory: 7868kb

input:

500 500
.ec...a...fbb.aa....de.....e.......bd..bdeeeff.a.b...........c....e.ca.dbe..eedaa..d.cddc..c..ccbdc.aee...c.fce.d...e..fddfb......b..ea..fa......a..cead.e.f.d....bc......ea...a.f..a....a.....efc.d.cfe.baf.e.e.c..d..a....c..ec..d....ebc.ec.......ddbc...ebb.ff..dead.b.ac..fe..ce.e......a.a.e.e...

output:

yes

result:

ok single line: 'yes'

Test #35:

score: 0
Accepted
time: 41ms
memory: 7688kb

input:

500 500
djebdknlnkkkkkdbnmdhjimlkgkmdahblbch.hnlddcehclbekbafhkfahagmhiieah.kkknklcaielnfnendejgaffiekjkkkidmicnkmdgaikmjcgehebhigcjhbmijndemeljdkechaebdnlkmikkkckdgnhaadmnhmjhkfbjdcdkgkkkkiflndcchhgfkcfelnnmdhhgieachdhfghihieikfchenmiemejbkkkikfddi.dnadmfdegklkbghikfkkkmhdmkgnmiifjkbanhkfhdhcabfdn....

output:

yes

result:

ok single line: 'yes'

Test #36:

score: 0
Accepted
time: 32ms
memory: 7660kb

input:

500 500
l.hd........d.....lva..s....i...r...r....j...b...sth.frs.ik....t............p.k.qq..m.......b.....m.gvi...f.t..qf.....t..dt.p.b.......eg.u...q.v.........s.h...ip.kc..i.h..d...v.m.b....hb.ld.r.m..hlhu...u...e....l.i...k.m.cdu.......vj..e...l....m...m.n..........a..tc.....ai..a....o.....om..p....

output:

yes

result:

ok single line: 'yes'

Test #37:

score: 0
Accepted
time: 49ms
memory: 7624kb

input:

500 500
igb..hi.fc..ede..d..ehacfaia.f.g.hb.ad.......h.hichfd...ae.agi.gegi.a...ddhfbdi.hh.b.ib...g.biifh..a.d.hhab.a..acec.gh..a.hfdc.bch.i..daia.dcda.bieachifd.bbahbd..c..hbbcd.aeiie.cb.dfha.h.haggcbfaiba.hda.dfhigce.e.ehg.ce.fh..bcbee.hhdg.gciff.egee...a.ghd..d.gbcbiaiga...i.ehb.dd.ahiedef.ddggi....

output:

yes

result:

ok single line: 'yes'

Test #38:

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

input:

10 1
c
.
.
.
.
.
l
.
c
b

c
l
b
c
.
.
.
.
.
.

output:

no

result:

ok single line: 'no'

Test #39:

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

input:

9 4
k...
..n.
hhbh
.fdd
fda.
..ok
.lef
..k.
eobm

khan
kfoh
fdef
elkh
obd.
b...
d...
m...
....

output:

yes

result:

ok single line: 'yes'

Test #40:

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

input:

7 7
...c..c
c...c..
d...b..
....c.a
.......
b.cbcb.
.......

.cbdccc
...bcbc
.....ba
......c
.......
.......
.......

output:

yes

result:

ok single line: 'yes'

Test #41:

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

input:

10 4
....
....
..wn
....
....
....
....
....
....
....

....
....
....
....
....
....
....
....
....
..wn

output:

yes

result:

ok single line: 'yes'

Test #42:

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

input:

3 5
m....
h.k..
g....

...mg
....h
....k

output:

no

result:

ok single line: 'no'

Test #43:

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

input:

238 218
....v.w.mk.dkwi....qz...fyae...xjz..bdk..uuetxo......q.j...d.hta..mu.ha....cqlg.cbou..l..gc..w.fryubayqj.sf......av.r..z..fvt..i...uf.g...........m...mn.w.mj.x......q...q.xgxbnq.fqjoo......qxvc.qnr...f..cbb.....n.....y
....e...i..x.e..................b....tk..w.......w.......c.i.w..w..k........

output:

yes

result:

ok single line: 'yes'

Test #44:

score: 0
Accepted
time: 24ms
memory: 6924kb

input:

487 438
..dc.f.dhcaefc.ag.d.cjc..e.je.hfib.ib.j.e.dccjacd.jh.ccc..hhc.g...h.cicccg.i.gccac.haec..h..ab.c.fheij.c.jc.bdh.c.gcg.c.j.g.f.j.h.d...ba.aifbd.gc.chgbed..gjif.de.ec.g.jjeeccacif..c.jgjc.cec.ff.jc.eg.ddeghecj.dfc..ff.gghch..j..hbi.dahagbb.ggd.f...jibe.g.fcg.ejcjeeecj..ghajgi..e.dcb.ciid.efdb....

output:

yes

result:

ok single line: 'yes'

Test #45:

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

input:

15 461
b.dbc.gec..eg.....dde.d...cg.c....fab....aae....f.a..be.c...fg.e.......bed.a.a..g...fa......c....b....g....d...dc.b......b..c..fb..cf...a.....dac.g....f...ec.db.bfdgcg...c.d......d.......ec...b....g..a......gd.ggc..d.g...f.bb.f.c..f....gb......f..a.dc...d...dfefc....a.g.e..a.d..d.e.b...g..ea....

output:

yes

result:

ok single line: 'yes'

Test #46:

score: 0
Accepted
time: 4ms
memory: 4060kb

input:

428 49
ndj...mh..g.m.i.b..kb.j..nei...lgffe..c.hej.n...i
genbamkh...l..lfff.h.kca.gc.mdh.ih...ica.ldnhhhik
.............................h.......h...........
a.cibcnhf.ibilebh.fhbfd.hl.n.fbd.b....ke.fa..e.kf
.................................................
...............e..fm.h.....d..hb.hh...h.......

output:

yes

result:

ok single line: 'yes'

Test #47:

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

input:

1 420
..d.c.cbb..d.abdda...c...bbc.db.d...d.b.b.a..bc.cd.abcccc.cb.a.ac.dd..d...c.caa..cbdd.cdb.a.bda.b.a..cbb...ab.b.b.c.bac.aaab..aa.dbb..ada..aaabab.d..baccbccdbbd.......a...c.bdcc..ddd.badd.cc..badbc.adbb....b.dd...bcb...bdb.d..aa.acab.ad.a..aa.ac.a.adbdbca.d.c..bcd.bdddcbc.cc.daac.cc.c.b..dcacc...

output:

yes

result:

ok single line: 'yes'

Test #48:

score: 0
Accepted
time: 43ms
memory: 7624kb

input:

500 500
...........a..........m...................b..............cg.....j................c................km.....k.............a.g...............................o.g....e.i.........h.....................n.............b....e..d....................l......................i...l.................f.....b..m...

output:

yes

result:

ok single line: 'yes'

Test #49:

score: 0
Accepted
time: 25ms
memory: 7576kb

input:

500 500
b.d.....d.ad.a.ccd...dc...d..bc...............ac........a....................b..............b.......d..c....ac......................d....d............b................c.....a.....a...d..b......................a.......d.b...b........a.......c.......a.....b.d................b..dd........d........

output:

yes

result:

ok single line: 'yes'

Test #50:

score: 0
Accepted
time: 54ms
memory: 7532kb

input:

500 500
ef..hfkbbfgg.ggfaj.i.l.f.fiigbgakld...bjjfladbg.ijkc..g.fkjjcebllbgd.hddh.abglbc.clilagc.cefifhij..gj.cfh.jka.gcf.e.dllkef.ggkffh.lkdgaji.fg.c.hga..ceajbjkkjejfhgcjiaf.dgfbihe.bkd.jeaec.gae.elbjh..b.fk.ileihddef.lgcbl.egfka.afhlgkfbkccklid.fh..igf..jckdca.jafeebhe.cfdgflfai.effi..cffbbd.j.gc...

output:

no

result:

ok single line: 'no'

Test #51:

score: 0
Accepted
time: 43ms
memory: 7796kb

input:

500 500
iah.fbgnlhahdbobnbojkgggafbfnianbnalnlmjbaafjgkmml.hangakeamfgjjhacancngnnnceolibdekjfgaljalhba.ncclbn.jhmohcnmleda.moimmkajenjcjkgmkalnaocafmnehaaaccmlaoggdldbkibomhkbf.gmnabdoahlamnfhfdngiofdnbhcdmbhfgbkiblhammhcngjenlolcchaaclmnjanbahbjkhmaheoolednbogcjmhajmljclfihhakbg.dfcobnagnlldbajkoa...

output:

no

result:

ok single line: 'no'

Test #52:

score: 0
Accepted
time: 54ms
memory: 7876kb

input:

500 500
clkabhi.kkecebhfeicieiggchhjcjdabekabkjihcgfckkdbkgj.jiifblalbjkcfgkfchkakjfgiclkjfbfbbcddcfgg.hjhiiiagabaiklaeaglaiafjeagceeebbahfabhiefbhfcfilgajhabkke.gcigebffaddfejadkfeibejcgeadlbjlikd.ebhjaaeeeafgkailljggbhekfbieiefikkbej.kfkbggdjgfibbafkfcbbj.adcgfckkiidhhgeaj.kkagbeebiklei.ebbhk.ekfk...

output:

no

result:

ok single line: 'no'

Extra Test:

score: 0
Extra Test Passed