QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#780788#6424. Gonullptr_qwqAC ✓800ms160756kbC++142.9kb2024-11-25 13:13:322024-11-25 13:13:32

詳細信息

Test #1:

score: 100
Accepted
time: 5ms
memory: 40524kb

input:

3
2
.o
..
3
.x.
xoo
ox.
2
oo
oo

output:

0
870527216
485539347

result:

ok 3 number(s): "0 870527216 485539347"

Test #2:

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

input:

2
4
xoxx
oxo.
oo.o
oo.x
6
.o.xox
oox..x
o.xxxo
o..xxo
xxo.o.
xo...o

output:

409509910
370473030

result:

ok 2 number(s): "409509910 370473030"

Test #3:

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

input:

800
2
.o
xx
7
ooo.oox
oo.ooox
.ooxo..
o.oo.oo
x.ooooo
ooxoooo
xoo.ooo
7
oxxxx.o
oxxxoox
x.o.ox.
xoo.xxo
o.oxxox
xxooxxx
oooxxox
4
o.xo
o...
..xo
oxx.
7
ooooxoo
.xoxx.x
xoxoxxx
oxoxoox
xxxxoxx
ooxoxox
ooxoxox
10
x.ox.xxxxo
xoxxooxoox
xxxxoo.ooo
xxxoxxxoxo
xxx.xoooxx
.oxxooxxxo
xxoooxxxxo
oxooxxxoxx
o...

output:

0
249234238
540967184
0
576468701
764482080
0
0
902304782
819328244
160846442
0
352620216
0
0
370473030
668019878
941153329
21426912
663359588
440560176
995720548
1000007
0
0
9889997
214191552
788820559
64395670
120935390
377081136
565792142
295776125
0
135122993
203830701
8109391
158328425
0
0
0
35...

result:

ok 800 numbers

Test #4:

score: 0
Accepted
time: 6ms
memory: 30548kb

input:

500
10
xx...xx.xo
x.x.xx.x..
xx.xo..x..
o.xxx.ooxx
xo...oooxx
.o.ooooxxx
xxxxo.x..x
o.x..o.x.o
xox.x.....
.o.ooxxx.x
10
xxoxxxx.xx
xxoxxx.x.x
x..x.x.xxx
oxxxxxxx..
xxo.x...xx
oxx.o.xx.x
oxxoxxx.x.
xooxx.x..x
.xxoxoxxxx
xo..xxx..x
10
xxxoxx.xx.
....o..x..
....oxox.x
o..x..x...
x..o.x.o..
..x..oxo.o
....

output:

103178655
682777521
0
0
133349536
610720560
71152127
0
248652419
563881446
915343956
44811441
0
239852635
178124065
176299797
0
0
856963352
369873363
837982230
601370956
120027846
257347325
34681532
962413216
687396819
308383519
393303568
195579753
309411244
696835580
300613755
649297673
349292913
5...

result:

ok 500 numbers

Test #5:

score: 0
Accepted
time: 37ms
memory: 32328kb

input:

50
100
.ooooooo.o.ooooo.ooo.x.ooxx..xooxooxoox.ox..oxo.ooooxoo.o...x.o..oxo.oo.....xoo.oo..o...ooo.xo..oooo
o.oo.x.xo.xooxooooo.o..oooxooxoo.oooo.xo.oxx.oxo.oooo..xoooo.ooooo.oooo.xx.ooo.oo..oooo.o.xooo.oxooo
x.ooxo.o.ooooo...oooooxooo.oooxoo.o.ooo..ox.ooo..xooox.o.xoooo.ooooo.xoxooo...o..oo.oo.o.oo...

output:

334375899
974363690
2559871
306504926
41246033
273863549
597561319
467018406
276945413
945810035
717335562
995397123
838621071
44680506
643752788
26235995
866893809
170177484
387259673
117895647
111792
323870998
167866394
722220979
432601870
622682412
229406328
897072072
417354438
285310240
24188202...

result:

ok 50 numbers

Test #6:

score: 0
Accepted
time: 800ms
memory: 160756kb

input:

5
1000
oooooooxoxo.oxoo.oxoooooo.oooxx.o.ooxxoxooo.oxxoxo.xxoooooo.xoox.ooooxooo.ox.ooooooooooooo.oxo.oooo.oooooox..oxoooo.xxxooxooxooooxoooo.xooxo.ooooooooo.xoo..ooooxxx.xooxxoo.oooooooxxoooxoooooxoxooooxxxoxoooxxooooxooxoooox.o.o.oxooxxxoxo.oooooxxoooooxoxxx.o.oxoxoxoox.ooxoxooooooxoo.xxooxoooo.xo...

output:

572746451
535440451
535196357
707383201
22676381

result:

ok 5 number(s): "572746451 535440451 535196357 707383201 22676381"

Test #7:

score: 0
Accepted
time: 316ms
memory: 103780kb

input:

10
262
xxoooxoxxooooxooooxxooooxoo.oxoooxxx.ooooxooxo.xxooxoxoo.xooxoxxoooxooox.xoooooxxoooxxxxx.ooxoooooxxxooxoxooxoxxxooooooooxoxooxxoxxoxooooxoxoooo.xooooo.xoo.xxxo.xxoo.xxxoooooooxooxooxoxooxooxoooxoxxxxxxoxooxoxoxx.oooooooxooox.xooxxxoooxxoxxxo.oxxoxoxooxoxoxooxxo
oooo.xooxoxooxoooxxooxoxooooxx...

output:

642283451
377422271
716465066
994238873
791578692
559154160
219046400
675893326
802853676
745406025

result:

ok 10 numbers

Test #8:

score: 0
Accepted
time: 8ms
memory: 38424kb

input:

500
10
xxxo.xxox.
oox..oxox.
xxxo.xxox.
x.xo..xx..
..........
xxxo.xxxo.
xxxx.xx.x.
xoxx.xxxx.
xxxx.xxxx.
..........
10
.oo..ooo..
o....oo.o.
o.x..o....
oooo..oo..
..........
o..o.o....
xoox.o.oo.
..o...oo..
o..x.oooo.
..........
10
.o....x...
...o......
.....x.xo.
.......o..
..........
xo.o..o...
....

output:

425573033
0
0
0
0
133992286
0
14957338
0
825303110
0
0
838611205
0
47630816
609412080
0
502385852
908019321
760477067
934365459
0
442686806
169316079
0
449991058
0
248974492
471368964
0
0
0
0
96548633
827642260
959216386
366981841
649536401
273659739
0
156012909
0
136775788
0
257252435
997886536
620...

result:

ok 500 numbers

Test #9:

score: 0
Accepted
time: 36ms
memory: 39340kb

input:

50
100
.xxo.xx.x.x.xxoxxxo.x..x.x.ox...x...x.x.xx......x..xo.x.xxx......x.x..xo...x.x..xxoxxxxox.xxxxxxxxx.
x.xx.x.x...oox...xo...xo..ox...xo.x.....x.xxo.x.o.xx.xxxxox......xx.o..xoo..x...o.xo.x.xo.x.o..xo...
.x..x.oxx.o...ox.xx..o...oooo..xoxxx.x...x.x.x.x.......xxx..x..xxox...xx.x.x.x..xx....xx......

output:

826174191
743161530
488249388
305372872
256288104
612268814
71341955
164091870
110136906
796723707
601145811
966958927
682673510
642274559
500901171
0
982464722
614704695
766380241
4382824
19176781
896058532
177343140
965583433
618558610
274592760
550087062
697539883
57503778
824856417
925501822
129...

result:

ok 50 numbers

Test #10:

score: 0
Accepted
time: 456ms
memory: 115852kb

input:

5
1000
.xooxo.xo.xoxxx.xoo....xx.o...xxo.oxx...oxxxo.x.x....xoox.......oox...x.x.....x..oxx.xoox..xo.ox.xx..xo.ooxxo.ox..x..o....oxo.ooo.oo.oxxxx....oooxo.o..xxoxxoox.xo..x.xx..oxooxo.ox..xx.o.xo..x.xx.xxx..x.o.oxx...xoo..xxx..oooxxoxxx.o..oxxxo...oxxxxoxx.oxox..ox..x.xo....o.oxo..o.....xo.oxoxo.ooo...

output:

772108458
592105946
316007691
244295102
691331313

result:

ok 5 number(s): "772108458 592105946 316007691 244295102 691331313"

Test #11:

score: 0
Accepted
time: 631ms
memory: 142312kb

input:

5
1000
o.x..oooxo.ooxoxo..o.oo.xo.o..oo.xxxxxxooxoo.x.o..ox...oooxo.xo.ooo.x.ox....x.o..oo.....xoo..x.o....oox.xxxxoooxoooxx..xox..oo.xxxo.xxoxox.xoxxxxox...oxxxo..x...oxx.o...ooxx.xooo.o.x.xxxx.x.x...xx.ox..xooooo.o...oooxxoo...oo..x...o..xxxox.o..xoxxo...ox..xxxoxx..xx.x..x.ooooxxxo.oxx.oo..ooo.o....

output:

780114096
588882268
370690962
385871818
302680710

result:

ok 5 number(s): "780114096 588882268 370690962 385871818 302680710"

Test #12:

score: 0
Accepted
time: 715ms
memory: 148376kb

input:

5
1000
.oo.o...oxxoxxo.oo.oooooxxoooooox.ooooo.o..xoo.o..oo...o.oooo.o..ooo.xooo.ooox..ooooxo.oooxx.ooxooo.o...ooo.oxooooo.xoxooooxoxo..oooooo.o.ooox.oxox.ooo.oo.o...x.o.oox.ooooooo...oxoooo.oxoo.oo...oooxo.oxo.xoo.oooooooooo...ooooxoxoo.o.ooooo..xxx.o..o..ooo..oxo.ooxo..oooxooxoooooo.oooooo.oooo.oo...

output:

610606331
377709703
636298655
677130621
388172310

result:

ok 5 number(s): "610606331 377709703 636298655 677130621 388172310"

Test #13:

score: 0
Accepted
time: 599ms
memory: 140696kb

input:

5
1000
oo...o.ox..ooxoxooxo.x..xooooxoo.x.oxooo...xoox.oooo.xooo.o..x..xooox.xoooo.ooxoxxoo.o.xo.....xo.oo..x...o.o..xx.oxo..x......o.oo.xoxo..xoxo.ooox..x...x.x.oxxox.oooo.oxxo...x.o...x...xxoxoo.oo.oxoo......o..o.x.ooo.oooo.o.o.ooo.ooooxo..xo.xox.xo.ooooox.xo.ooooo.o.oox..o.o..oxoo...ooo.oo.oooooo...

output:

639899078
654599944
422791417
498274386
976944019

result:

ok 5 number(s): "639899078 654599944 422791417 498274386 976944019"

Test #14:

score: 0
Accepted
time: 622ms
memory: 132612kb

input:

5
1000
xox....xx...ox...x.x....oxx..x..o..o.ox..xox.xo..oxo...o.x..x.ox..o..o.x...x.o.x.ox.xxo..o..o..xxxx...xxxx.xxo..xx....oox.xxx.x...xo..x...xo.o.x.......x.xxo..xxx.x..xxo...xo.x.xx..x.x.x.o.x.x....xo.xxox....x.x...xoo.oxo.....ox...o...x..x..x..ox.o.o..o....x......o..x.....o.o.oxoo....x.xx..oxx....

output:

32778879
896031358
588756562
369206132
506764249

result:

ok 5 number(s): "32778879 896031358 588756562 369206132 506764249"

Test #15:

score: 0
Accepted
time: 583ms
memory: 140952kb

input:

5
1000
oox.o.oo..xoooooo..o.xooox..ooxox.oxx.oooo..o.xoo.o.ox..xoo......xooo..o.xxxoxox...x....oxx.xoxxoooxoxx.oxoo.o.x.oxo.oxxoxo..xx..o.o.oooo.o.o....x.oooo.xoxo.oo....x..xo.oo.oo.oo.oxxxoxxo.xxo.xo.x.xxx..o.o.oooo.xxoxoxooxo....xo.xo.oooxoxxoxxoxooo.ox.o.oo.oo.o.ox...ooooox..o..x...o.xo.x...oxooo...

output:

841683550
137941843
191188635
117557561
456785809

result:

ok 5 number(s): "841683550 137941843 191188635 117557561 456785809"

Test #16:

score: 0
Accepted
time: 595ms
memory: 134508kb

input:

5
1000
oxo.....o...o.xo..ooo..o...xo.ooxoo.ooo..oox.o...x.o.oo..oo.oo.o.o..xoxoo..xoo.o.ooo.o.o.o.xx..oo.....o.oooo.x..xx.ooxo.oo.x..xx..xoo.xooooooooxxoo.o.o.oo...o.oxo.oox..o.oxo.o..oox...o...xo.o..o.o.o.ooxooo...ox.oxoo.ooooxooo...x..o.oox..ox.oo...oo.x.oxoox..x.o.o.....ox.oxx..o......oooo.o.oooo...

output:

900174562
195157973
593744043
69182036
766166480

result:

ok 5 number(s): "900174562 195157973 593744043 69182036 766166480"

Test #17:

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

input:

500
10
xxxxxxxxxx
ooooooxooo
oooooxxoxx
xooooxxoxx
xoxooxxoxx
xxxxxxxoxo
oxxxoxxoxo
oxooooxoxo
oooooooooo
xx.xxxxxxx
10
x.xxxxxxxx
oooooxxxoo
ooxooxxxxo
ooxooxxxxx
xxxxoxxxxx
oxxxxoxxxo
oxxxxoxxxo
ooxxxooxoo
ooxxoooooo
xxx.xxxxxx
10
x...x.xx.x
oooooooxoo
ooxooooxoo
ooxoxooxoo
oxxxxoxxxo
xxoxoxxoxx
o...

output:

30791207
434411883
861450305
805858010
452888831
944267590
613327534
592046697
516629158
559391474
744676155
65281156
258253351
178865181
434658866
439831818
32267021
999877053
236106959
839744459
440355414
767497935
154797784
535141412
925905983
916487041
815086639
675176665
22137530
131253253
9682...

result:

ok 500 numbers

Test #18:

score: 0
Accepted
time: 16ms
memory: 38748kb

input:

100
50
xxxxxxxxxxxxxx.xxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxx.
oooooooooooooxoooxoooxoooooooooooxoooxxxoxxooooxoo
ooxooooooooooxoooxoooxooooxooooooxooxxxxoxxooooxoo
ooxooooooooooxoooxoooxooooxoooxooxooxxxxoxxoxooxoo
ooxoxooooooooxoooxoooxooooxoooxooxooxxxxoxxoxooxoo
ooxoxooooooooxoooxoxoxoxooxoooxoxxooxx...

output:

192709039
545741791
693323452
280572014
622738317
319986132
551023123
7301367
753983072
307149312
739641617
418687680
541349731
618840048
586089870
564402163
794335864
961547810
638078130
319636237
592050150
83499286
37751839
963059994
791750358
367029717
354887060
669097112
749616877
835370602
7023...

result:

ok 100 numbers

Test #19:

score: 0
Accepted
time: 31ms
memory: 39524kb

input:

50
100
xxxxxxxxxxxxxxxxxxxxx.xxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xx.xxxxxxxxxxxxx.xxxxxx
oxoooxoooooooooxoooooooooooooxoooooooooooooooooooxooooooxooooooxooxooooooooooxooxooooooooooooooooooo
oxoooxooooooxooxoooooooooooooxoooooooooooooooooooxooooooxooooooxooxooooooooooxooxoooooooooo...

output:

136353153
242903051
842299304
228660358
108966699
660160713
398215129
658167311
861339688
707834421
370355870
733223273
402843179
680446936
215017091
581918110
402999292
419260565
12867971
651430595
841500882
712955796
471121968
877061477
476250757
665396021
473746656
152203437
782103196
56976380
53...

result:

ok 50 numbers

Test #20:

score: 0
Accepted
time: 68ms
memory: 48560kb

input:

25
200
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxx.xxx.xxxxxxxxxxxxxxx.xxxx.xxxxx.xxxxxxxxx.xxxxxxxxxxx.x.xxxxxxxxx..xxxxxxxx.xxxxxxxxxxxxxxx.xxxxxxxxxx
oxooooooooooooooooooxoooxooooooooooooooxooooxooxoooooxooxooxoooxoooooooooooooooooooooxooooxo...

output:

665387810
852862001
194108890
720319580
451941489
600250572
186652802
327387906
969425652
343328133
427229601
583382921
535319227
162240888
257364933
666030752
408922601
15234759
169091210
678109223
109837112
47314838
911725012
578743936
513135858

result:

ok 25 numbers

Test #21:

score: 0
Accepted
time: 163ms
memory: 49572kb

input:

12
400
xx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxx...

output:

377789863
895163399
91372106
241989342
16188050
819942883
300586720
938863211
738590968
810198927
238292645
147322777

result:

ok 12 numbers

Test #22:

score: 0
Accepted
time: 219ms
memory: 68488kb

input:

10
500
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xxxxxx.xxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...

output:

258493295
533157442
760003354
659875278
733493742
197053230
684495125
799911128
267454479
366590684

result:

ok 10 numbers

Test #23:

score: 0
Accepted
time: 408ms
memory: 118164kb

input:

6
800
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxx.xxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.x...

output:

389087400
933140150
230452816
440494472
226658918
241413124

result:

ok 6 numbers

Test #24:

score: 0
Accepted
time: 599ms
memory: 149244kb

input:

5
999
x.x.xxx...xxxxx.x.xxxxxxxx..xx..xxx....xx..xx.xxx..xxx.xxx.xxxxxxx.x..xx....xx.x.xxx.xxx.x.x.x.xx.xx.x.x.x.xxxxxxxxxx.x.x..xxxxxx.x.x...xx.xxxxxxxx..xxxxx.x.xx.xx.xx..xxxxxxxxxx.x.xxxxxx.x....x..x.xxx.xx.x.x.x.xx.xx.xx.xx...x.x.x..x..xxx..xxxx.xxxx.xxxxxx.xx.xxx.xx..xx.xx..x...xx...x.x...x.x.x...

output:

867796298
176040560
731044182
993981709
8599440

result:

ok 5 number(s): "867796298 176040560 731044182 993981709 8599440"

Test #25:

score: 0
Accepted
time: 609ms
memory: 149864kb

input:

5
1000
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xxxx.xxxxxxxxxxxxxxxxxxxxxx...

output:

554875620
803952240
843781212
497461780
583456447

result:

ok 5 number(s): "554875620 803952240 843781212 497461780 583456447"