QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#189802#7060. Paper Gradingnew_dawn_2#AC ✓921ms114432kbC++173.0kb2023-09-27 21:57:032023-09-27 21:57:04

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 3ms
memory: 19120kb

input:

3 4
aaa
bbb
aac
2 aasdd 2 1 3
2 aab 1 1 2
1 2 3
2 aat 2 1 2

output:

2
1
2

result:

ok 3 lines

Test #2:

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

input:

203 280
weoswjrqbctjwprpwhskdmupkrnvwqrzsgjgd
raxdectwomdlkriivpotxka
vjeyfjhpka
vjeyfjhpkr
vjeyfjhpky
uxe
ykytzfawioj
raxdectwomdlkriivpotxkw
vjeyfjhpkd
pioilxbjbxbgzkcwjlk
rqtxnvrllmaoj
raxdectwomdlkriivpotxko
vjeyfjhpka
dsf
uxj
fbpcblrbxqiyghzancwdoxhgglzuprfyggbdrscclmskyigukfixxgczalqahwbfqtzfi...

output:

8
3
6
0
13
3
3
3
1
4
11
7
6
0
3
18
2
1
8
10
11
2
22
4
7
2
1
0
24
3
1
5
3
3
11
5
5
5
2
1
4
2
9
6
18
3
4
5
4
0
2
84
10
8
1
11
8
3
3
6
1
0
1
7
4
8
0
2
0
3
3
8
14
16
6
3
1
13
3
27
1
6
4
0
0
3
8
5
2
3
1
11
4
5
1
3
8
8
2
3
8
26
10
20
0
1
11
1
11
4
2
1
1
0
1
1
0
2
0
7
5
0
16
0
3
0
0
8
1
10
1
11
62
0
36
0
1...

result:

ok 145 lines

Test #3:

score: 0
Accepted
time: 422ms
memory: 19736kb

input:

317 89607
nbijxrvqztvnbqkgommishjgdqohyakrdfydlvpkuktazejjoyfbijaffzaahjoofyciupjrhbobrwivlizdvfhhvnvpygbjpohwkolowrxcqxfmuohptgkppxvdmhouqevqmfgbfssfjwpdxzinzleyompmzojtkcmvsmkgtbngvxavpnsbyqpwfqhftpfbwsoaeiosobgvdozdrzysucguyokksmrtgaajrmqnuudqigareatptccdorguzwzijjsrsocergjmnmvtarnsegzrutdfixatpp...

output:

0

result:

ok single line: '0'

Test #4:

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

input:

24 29
vrlfltoyyzmkfhmfxfnqcjpselwmfxqkksavmdwrtefvphxiyczkfnovtgqcmxvdzhqhumemvinrycarflqxftfeasxydibleflezbeiubghfwghlgtpjdkwtvujxnwzogmxiwzxvznxoehkmhezmvzyibcqqpsxfasovwihnwpijchbnfqnemhgxbutvfjcjwrovrxixbuuqkhpoggshhtfskchwcgyjimcgcqthvhxbezleqalslbczmmkistzwrdrqbngkvioahqxdifaeaqxptnoggguaafdiy...

output:

4
0
1
0
4
2
1
3
2
0
2
1
1
0
3
1
0
1
0
0
0
0
0
2
3
4
2
2
0

result:

ok 29 lines

Test #5:

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

input:

39 31
dtgduerwxqglqmcjjrlyhbufsjnbhshppyvzrkbocdlwpmrogercisrxawpsidsvnsoaozcscfreysoitodshyjvzofogpnrkbrklxeeswejqhyyeosdtilapenigjjurnddlllgnephnftqqbgghkelzpybrumjmmgvxpnlvuiuvhrglvzxktzlhceykjgcuqnlfshntfiqjlgzigbqziqsgodnkdyuhdwekovesixgmjxwxdbjncdfzystbxvxxjakhjdkxrpcfditvdtrnlxuwfjhhruztngmtg...

output:

4
3
0
1
3
1
0
0
0
1
1
0
1
0
1
0
1
0

result:

ok 18 lines

Test #6:

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

input:

36 30
pkmrluwwbyrtdtczxqswqkdpjeymewptoiacwtcbfovwpkcsaixrixyrnofmtiuvfhdiprjewjqdsjjgiiyaoeyexuqngjdardfdwqdhylqkresmakfvuiciudugrdbkrnzuhqceckpvaoeopgsvqcnfutjkwznsmesvuszwepnujkapajpvgxwmjaelarxfgirxbxevifyytnpnmidnguczoshufpnnbpsqhtubdunsdhdireugnozvhcfpnflgicbyxhbcycqqblvsblnknfkpwfokiyqnjrmkcl...

output:

28
0
0
24
0
14
28
1
1
0
0
0
0

result:

ok 13 lines

Test #7:

score: 0
Accepted
time: 26ms
memory: 20512kb

input:

2192 2913
hgi
yyumtc
vuwh
vs
bra
asb
nw
ly
mz
gmy
koyeachjhitvauol
suur
xur
mq
pt
jquutracupyvjghj
vu
sf
tziaweh
atssmwvkhdrqhfjbdojkddreecwiiaaevzdtn
jquutracupyvjghb
rs
fh
nl
ldcfo
im
djnh
bexx
krq
jwbxcos
qj
ue
ty
pn
pl
tj
ldcfn
ezkkmadyuru
tb
pu
suud
bext
hb
fk
yyumtl
jquutracupyvjghw
ax
suun
rk...

output:

4

result:

ok single line: '4'

Test #8:

score: 0
Accepted
time: 11ms
memory: 21068kb

input:

3117 3696
hga
jw
puc
uytbqiemzxgywaycp
mr
dptzdkij
fyzr
tbqxo
nsmypi
opwjp
jijesf
ksthei
fa
dptzdkiz
leqy
mtfd
jijest
pzuwdsvbbjuaadlalrzynhwopgtyjwgdaqptzdzlhyicuyudoafjgkpjg
pem
oquq
ym
dptzdkie
rw
nja
leqm
ijhsho
mk
kykr
jijest
dptzdkir
jijesk
mpcpxoibltxhtjuxtjwnpmlszlod
hgq
asnhmyeq
doseewjznqr...

output:

60
10
36
14
1
15
32
30
11
10
417
25
27
7
107
4
26
923
14
2286
3
17
11
42
1
30
15
4
902
4
22
27
24
19
21
4
36
251
4
33
49
27
7
14
44
1
6
5
414
31
8
4
45
7
26
48
7
12
11
8
3
15
3
131
27
14
17
3
18
8
501
25
37
2
9
12
4
16
39
12
26
17
29
31
18
6
8
4
26
4
9
25
0
10
13
139
272
1
1
0
13
4
0
27
24
21
2
32
7...

result:

ok 3696 lines

Test #9:

score: 0
Accepted
time: 230ms
memory: 33588kb

input:

26995 24352
ckzwzs
tyjiyyf
cakgdzwropdgh
ksxmsraek
kastagdvnldl
ltawy
xtx
mbkdllfpayzl
ptjqni
wwwwam
okmgyzj
ipuncesd
h
rzrqrf
pzzpgpvgrbqj
zpfmmrnnmlp
zsahst
sxgvakhw
uxgycidiaw
cyysfcpkif
qszbf
diwhq
ovvlqznfr
tkmiqwlfo
onoyqzarms
pdkw
svn
hayrjpt
pqhxtbeviwnrb
onjvhv
zqjmpxq
dzgef
fjrohigyrrfn
bx...

output:

0
0
0
1
0
0
0
0
39
0
38
0
818
0
0
0
10
0
0
1084
0
0
16416
64
25
1
4213
6
5
0
0
36
0
0
37
0
16
710
0
47
0
0
664
0
0
6051
0
0
18
13
0
0
14
1389
2299
15
8
0
1
0
0
3
20975
0
0
14
62
2
10201
226
56
0
9647
0
0
0
0
0
0
25
25
85
0
0
48
23
13
338
0
33
0
22
0
0
0
5
841
0
0
0
8996
0
332
70
23
21
0
165
16
29
0
...

result:

ok 12191 lines

Test #10:

score: 0
Accepted
time: 336ms
memory: 35924kb

input:

31872 35506
wtchxvefapl
owfr
pkkhyzvnevrm
rovgogz
caoyx
xurv
ajyhrgh
znkn
qvzxbvmd
f
qfqtdbo
ueh
pzj
vrebk
jtmlqfa
glbygmn
btuxctxjmd
ekbqlc
sxyqm
dhdvlx
nubkdnz
zkxmf
drdsxmici
xurvh
d
jtmlqeic
azjoukzmn
cenwtzvpy
qujgckb
rofgzup
ixuacsl
lilwbh
qwyyqbeyufr
fntym
gewbsoshyv
dbuepo
lek
inekxsdnsds
ec...

output:

3
0
9
3
957
127
0
19
159
0
48
137
42
24195
15
4
0
8431
23
35
0
0
0
0
2380
1049
9
0
15
56
0
37
0
0
3
1273
25
35
29
17069
746
26
0
10
156
12
22
3
34
0
39
16206
5
0
0
504
2
66
0
6
5106
1852
0
211
0
42
21
28
27
8
18076
20
14
4
0
0
0
937
0
19
798
0
61
20
2555
12
0
43
0
175
60
5763
133
0
25
0
0
32
14
1
30...

result:

ok 17859 lines

Test #11:

score: 0
Accepted
time: 233ms
memory: 31644kb

input:

23221 25749
wgizrp
kpjngfswox
sujn
drv
crrclnwvuk
gancpmaw
ldsurhxad
yjmriiamkcbngcv
yfjlewa
omfljrl
qv
namskbkmxs
dgxjm
kkbjdcwyghsmbmwp
uk
qvdgaubcqwsalsc
drdjesci
ozncyi
lydrmjz
ahaadhpdgyzw
afgywful
ozncytq
prpdgcnhqukpet
oszbxls
lukllw
ghsdmoplucmq
ucbpiqyxqnzdvb
pxobxw
oxqjjcclzif
huylxcmppxe
...

output:

97
12
56
0
0
0
63
0
22
15
100
44
102
41
0
0
0
0
0
0
33
0
10253
0
38
0
254
2
0
102
123
38
465
471
17
28
501
25
0
0
0
118
10
0
0
0
45
0
91
244
0
84
0
0
2
17
177
79
5859
260
17
84
40
77
0
0
32
123
50
11
7940
708
91
0
179
11
0
14
13
0
0
0
9653
0
18
48
356
20
130
0
0
8884
20
41
23
120
4
50
0
3
15
98
15
7...

result:

ok 12830 lines

Test #12:

score: 0
Accepted
time: 424ms
memory: 37536kb

input:

34761 32323
annaz
rwawgctleg
thxykd
dhcba
jfhvcb
ismifpone
iaryss
hz
nxkpom
sajnqe
ogspgsv
saivzo
oggqv
ismifel
akysnxepy
hntbn
iomjdvkj
gamsx
dqgl
rgfdln
r
gczl
saummz
soo
zrnhurq
gxtc
annazo
s
gotgxf
jzscyfe
ldbih
ensth
ornubs
ywoczhp
e
ziomd
retm
vycnzxfgwp
hqbvgn
jbfol
gvgaxbr
dwkib
annazj
ismif...

output:

0
0
69
38
382
327
139
141
35
1017
26
191
0
0
116
302
0
871
11416
78
80
0
894
0
0
0
0
157
0
0
21270
0
1198
32
0
0
0
222
0
0
392
79
118
195
92
245
13
113
243
1
2309
0
17713
0
174
11477
122
232
17
23
0
160
631
192
16513
12354
0
0
22
224
0
0
543
579
90
8890
0
330
0
190
0
114
391
0
0
0
1357
81
0
989
337
...

result:

ok 8151 lines

Test #13:

score: 0
Accepted
time: 282ms
memory: 38096kb

input:

35597 20949
hrnqq
hq
vyqhsq
a
l
caois
bjbdgtlz
fcfrm
nxhm
qvi
mb
chqbvtj
sqqzo
lonjqysb
mly
tdhakdfp
pijtoxcx
qwjypcl
uvcvoas
dgugxft
xuocrbim
vgs
vbezh
mxamf
sspgtaezu
dtr
twcxa
ycurlheq
c
eembjafcf
lpdkd
wsrkonxor
tta
dtrgw
cpkbku
skky
lanoquy
xshcaczxxn
rgkpwhu
wcbxr
lqiw
reuldnvlrp
bgp
cbbej
hdx...

output:

0
46
0
0
0
0
0
54
0
0
0
0
0
0
0
9
0
0
0
0
0
58
0
0
0
704
0
0
0
9
0
0
0
0
0
0
0
1
0
0
157
0
72
92
64
0
0
12525
1548
923
0
115
0
0
0
0
12
0
1
844
0
0
48
14
82
300
0
0
0
12
0
0
0
14079
0
12
507
0
0
113
0
0
47
2
0
75
0
0
0
0
0
952
0
0
0
55
0
0
0
114
34
0
2
0
8228
0
0
0
0
0
0
0
0
0
0
66
0
0
6
19279
0
0
2...

result:

ok 5180 lines

Test #14:

score: 0
Accepted
time: 921ms
memory: 114356kb

input:

200000 200000
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
b
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
...

output:

99999
199996
99999
2

result:

ok 4 lines

Test #15:

score: 0
Accepted
time: 106ms
memory: 19292kb

input:

2 100000
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

2

result:

ok single line: '2'

Test #16:

score: 0
Accepted
time: 540ms
memory: 114432kb

input:

200000 200000
a
a
a
a
a
a
a
a
a
a
a
z
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
b
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
c
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
...

output:

199996
199996
199996
199996
199996
199996
199996
199996
199996
199996
199996
199996
199996
199996
199996
199996
199996
199996
199996
199996
199996
199996
199996
199996
199996
199996
199996
199996
199996
199996
199996
199996
199996
199996
199996
199996
199996
199996
199996
199996
199996
199996
199996...

result:

ok 199999 lines