QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#935011#4241. Angle Beats 2.0MaMengQi AC ✓25ms3968kbC++143.5kb2025-03-15 11:36:332025-03-15 11:36:35

詳細信息

Test #1:

score: 100
Accepted
time: 1ms
memory: 3840kb

input:

3
3 3
...
.*.
...
3 3
*..
...
..*
3 3
...
..*
.*.

output:

4
1
0

result:

ok 3 number(s): "4 1 0"

Test #2:

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

input:

3
4 4
....
.**.
.**.
....
5 5
.....
..*..
.*.*.
..*..
.....
2 2
..
.*

output:

1
10
1

result:

ok 3 number(s): "1 10 1"

Test #3:

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

input:

110796
4 2
..
..
..
.*
4 3
.*.
...
...
*.*
3 3
..*
..*
*.*
2 2
*.
*.
2 3
..*
...
2 2
..
..
3 4
*...
..**
..*.
4 3
..*
*..
.**
...
2 2
*.
..
4 3
.*.
...
.**
*.*
4 3
...
*..
...
.*.
4 4
.***
....
...*
....
4 3
...
.**
...
*..
2 4
...*
....
2 4
....
....
4 4
....
..*.
....
.*.*
3 3
*..
...
...
2 2
.*
....

output:

1
0
0
0
1
1
0
0
1
0
4
0
0
1
1
4
1
0
2
0
1
2
0
0
0
0
1
1
2
1
0
0
0
0
0
0
2
0
1
1
0
1
1
0
0
1
0
0
0
0
1
0
0
0
0
0
8
0
2
0
0
0
4
1
1
1
0
1
0
0
3
2
1
0
4
1
0
0
4
1
0
0
0
2
0
0
4
2
0
1
0
9
0
4
0
0
0
1
0
0
1
0
1
0
0
1
0
0
1
1
1
1
0
4
2
0
0
1
0
1
4
4
1
0
2
2
0
4
2
3
1
0
2
1
0
2
1
1
0
0
2
1
1
0
0
0
1
1
0
2
...

result:

ok 110796 numbers

Test #4:

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

input:

80956
2 4
.*..
*...
5 4
.*..
....
....
*..*
.**.
2 5
*...*
.*...
4 3
*.*
...
**.
...
3 5
*..*.
..*.*
.*...
2 5
*..**
*..*.
5 5
**..*
.**.*
*.*..
.*.*.
*.*..
2 4
..*.
*...
3 2
*.
..
..
2 5
.**..
.*..*
2 2
..
..
4 3
.**
...
.*.
...
3 5
.**..
*....
.*...
3 3
...
*.*
.*.
4 2
..
..
*.
..
5 3
..*
*..
**.
...

output:

0
0
0
0
0
0
0
2
1
0
1
0
0
0
2
0
0
0
0
0
1
0
0
1
1
1
0
1
3
0
0
0
1
0
1
0
2
0
0
3
0
1
1
0
0
1
0
0
0
4
0
1
0
1
0
0
0
1
0
0
0
0
1
1
0
0
0
0
0
0
0
1
0
2
0
0
0
1
0
0
1
0
0
0
0
1
0
6
2
8
0
0
0
1
0
0
0
0
0
0
0
0
0
1
12
0
0
0
1
6
0
1
0
1
1
0
1
1
1
0
2
0
0
0
0
2
1
0
0
0
1
0
2
0
0
1
1
1
1
1
0
1
2
4
1
1
0
2
1
1...

result:

ok 80956 numbers

Test #5:

score: 0
Accepted
time: 22ms
memory: 3840kb

input:

80956
4 3
**.
..*
.*.
.*.
4 3
...
...
...
..*
4 5
...*.
...**
.*...
.....
4 4
.*..
...*
.*..
....
4 4
....
....
....
....
2 2
..
*.
2 4
...*
....
4 3
..*
*.*
**.
...
3 3
...
...
...
3 5
..*..
*...*
.....
3 2
..
.*
*.
4 4
....
....
*..*
....
3 5
.....
*..*.
.*...
4 2
..
..
*.
..
5 3
...
*.*
*..
...
....

output:

0
1
0
8
1
1
1
0
1
8
0
4
0
2
0
2
0
2
1
0
0
2
1
0
0
0
0
0
2
2
3
0
0
4
1
1
2
1
4
2
4
0
0
2
0
2
2
2
0
2
1
1
1
1
2
0
0
0
0
8
0
0
1
0
0
1
0
0
1
0
2
0
1
1
0
0
1
0
1
1
1
4
1
0
1
1
1
0
1
2
0
0
1
0
0
1
0
0
0
0
1
1
0
0
0
1
2
2
2
0
1
0
0
0
0
0
0
1
1
3
0
0
0
0
4
1
2
1
1
0
0
0
0
0
0
0
0
0
0
0
0
4
3
0
0
1
1
1
0
2
...

result:

ok 80956 numbers

Test #6:

score: 0
Accepted
time: 21ms
memory: 3840kb

input:

60282
5 5
.....
*....
.....
...*.
.....
5 3
...
*..
*.*
...
...
4 4
....
...*
...*
*...
5 4
....
...*
....
.**.
..*.
5 4
..*.
..*.
....
...*
....
5 3
*..
.*.
*.*
...
**.
3 3
..*
...
...
4 3
...
*..
...
..*
3 3
..*
..*
.*.
4 3
...
...
.*.
.*.
4 4
..*.
*...
....
**..
3 5
*....
.....
...*.
3 4
....
......

output:

8
0
1
0
0
0
1
2
0
0
0
2
2
8
0
0
0
0
0
0
0
2
2
0
0
0
0
0
1
0
2
3
1
0
0
0
12
4
1
1
4
2
0
0
4
0
0
2
2
0
0
4
0
0
0
2
0
1
1
0
0
0
32
0
0
2
0
0
1
0
1
4
2
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
4
0
2
1
0
2
1
0
0
1
0
0
0
1
0
3
2
0
3
0
4
0
2
0
3
1
0
0
1
0
4
4
0
4
1
1
0
0
2
1
0
0
0
0
0
0
2
8
0
1
3
1
16
0
0
1
1...

result:

ok 60282 numbers

Test #7:

score: 0
Accepted
time: 18ms
memory: 3712kb

input:

23457
4 10
*.*.......
....*.*.*.
...*......
.........*
8 6
*...*.
......
....*.
.....*
*.....
...**.
...*.*
......
4 8
....*...
..*.....
.*.*....
...*....
5 10
..*.*.....
........*.
*......*..
..........
.*........
3 3
...
...
*..
9 5
....*
*..*.
.....
.*...
.....
.....
..*..
.....
*....
3 9
*.........

output:

60
0
0
108
1
32
1
0
1
48
0
0
0
4
0
0
16
2
32
0
2
0
0
2
2
0
0
32
2
0
0
0
1152
0
0
24
0
8
1
0
0
12
0
4
0
0
0
0
0
0
0
0
64
0
1
0
8
0
8
4
0
2
0
0
2
2304
0
384
0
0
0
16
4
4
48
2
0
16
4
4
0
3456
0
2
1
15
0
0
0
0
16
0
0
0
1
0
0
2
0
0
0
16
0
2592
0
0
0
0
0
0
256
1
0
0
0
0
6
24
16
0
2
16
0
16
32
0
0
64
0
0
2...

result:

ok 23457 numbers

Test #8:

score: 0
Accepted
time: 19ms
memory: 3840kb

input:

23609
7 3
...
.*.
..*
...
...
..*
...
10 8
..*.....
....*...
..*....*
*......*
.....*..
.*.*.*..
.....*..
...*....
.*.....*
.*...*..
4 4
....
..*.
.*..
...*
4 4
..**
....
...*
....
10 7
..*..*.
.......
*.*....
.......
......*
*....*.
....*..
..**..*
....**.
.*.....
8 6
.*....
......
*...*.
.***.*
.....

output:

6
0
9
0
0
0
288
0
0
0
0
0
1
0
0
0
0
0
64
0
3
0
0
0
0
0
0
0
24
0
0
0
0
0
0
0
0
0
0
0
0
4
0
0
4608
0
0
0
0
0
0
0
0
0
0
384
0
0
0
0
60
0
0
0
0
8
0
0
12
0
0
128
2
21504
0
0
0
0
0
0
480
0
2
0
0
4
0
0
0
0
0
16
0
0
0
0
0
144
0
0
2
0
54
4
0
0
16
0
6
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
32
8
0
0
256
0
0
2
0
0
0
0
4...

result:

ok 23609 numbers

Test #9:

score: 0
Accepted
time: 22ms
memory: 3840kb

input:

23609
4 10
..........
.**..*..*.
..........
....*..*.*
4 4
....
..*.
....
*...
5 7
.......
.......
.......
.....*.
.......
4 3
...
*..
...
.*.
9 4
....
.*..
....
....
..*.
*...
....
....
....
3 6
......
.....*
.*.*..
9 6
......
.*..*.
......
..*..*
...*..
.*...*
...*..
......
..*..*
5 7
.......
.......

output:

128
4
4
4
32
6
9216
1
4
32
384
6144
144
16
3072
24
32
4
768
49152
2592
2
128
30720
216
8
16
4
1024
16
144
32
32
9
432
8
8
80
64
36864
96
16
12
576
7200
128
1536
1658880
8
24
24
73728
691200
768
8
65536
2
8
1728
96
72
16
16
16
80
43200
120
3
288
16
16
256
1536
11943936
25920
32
9
32
1
4
162
2304
252
...

result:

ok 23609 numbers

Test #10:

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

input:

5847
12 13
.............
.............
*.*.*....*..*
......*......
....*........
.*.....*.....
.........*..*
.........*...
...*.*.*.....
.............
.....*.*.....
..*..........
14 14
..............
*.......*...*.
...*..........
*.............
..*.....*.....
....*.........
.*............
....*.*......

output:

42467328
41943011
78643014
552960
452984832
889187983
75497472
201326388
4
782237683
167763890
41943011
780118491
95551488
149356486
849346560
419427950
259164697
511705015
377481915
18432
687865726
13271040
234880624
125828385
16384
254803968
573308928
520093682
226492416
95551488
721417532
6459132...

result:

ok 5847 numbers

Test #11:

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

input:

5884
15 11
....*......
.*.....*..*
....**.....
..*.....*..
*........*.
..*........
....**...*.
*...*......
...........
..*..*.*...
.**......*.
.....*..*..
..*....*..*
...........
.*.*..*..*.
12 13
.......**....
*....*....*..
...*.........
........*.*..
.*..*......*.
..*....*.....
......*......
........

output:

754974684
21233664
208868335
62914557
480628561
859963392
970981354
714604516
561409429
127401984
16777199
199065600
335544304
53747712
226492389
619315200
350224343
377487342
419430380
41943038
442368
125829120
4147200
905969664
209715055
700034047
37748736
125828385
890241018
356507647
66059082
69...

result:

ok 5884 numbers

Test #12:

score: 0
Accepted
time: 21ms
memory: 3840kb

input:

5895
15 12
..*....*.*..
*....*......
......*.*...
*.*.*.....*.
..*.........
*.....*.*..*
.....*..*...
..*.*..*..*.
.*..**......
..*......*..
.*...**.*...
...*.......*
....*.*..*.*
*...........
..*.....**..
15 12
..*.*.*..*..
*.........*.
.*....**....
...**....**.
.*.*........
.......*.*.*
...*.*.......

output:

264110075
656408569
469761977
150976566
20971519
19050494
352278654
990904320
484442016
815740927
360710116
314048468
3732480
4717440
62914557
50331648
805305552
78643014
704642844
18432
721381082
937348674
709947388
148373503
37324800
3145728
59719680
13063680
343932863
566231013
889192438
75497419...

result:

ok 5895 numbers

Test #13:

score: 0
Accepted
time: 22ms
memory: 3840kb

input:

5904
15 13
*......*.*...
..*..*.....*.
...*..*.*....
.**...*...**.
..*.....*....
.*..*..*.*..*
*......*.....
..*.*.....**.
...**.*.*....
.*........*..
.*...*.*.....
...*.....*.*.
..*...*...*..
*...*..*....*
..*..*..*....
11 12
*.......*...
..*.*.*...*.
.*..*.*.*..*
...*......*.
..*.*.......
*.....*....

output:

83885590
100800
983564287
483840
40370168
791673445
8847360
35831808
2654208
541065174
503884800
199065600
737280
1990656
323026941
524880
1492992
242999294
827326461
35271936
339738624
14929920
463626240
895795200
435456
53747712
1128960
290304
497664000
400031731
2903040
100663194
638582061
139968...

result:

ok 5904 numbers

Test #14:

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

input:

5915
14 12
..*..*......
*..*..*.*.*.
..*...*.....
....*....**.
.*.**..*...*
...*........
*....**..*..
..*.*...*..*
.**...*..*..
.....*..*...
.*..*.*...*.
*..........*
..**.*.*.*..
...........*
13 11
...*..**...
*........*.
.*...*.*..*
....*......
..**..*.*.*
.*..*....*.
......**...
*..*......*
...*....

output:

147456000
388800
110592
382533613
220987263
864000
2211840
25804800
844316668
116121600
858259409
156764160
11059200
104857595
15925248
530841600
178651129
870912000
82944
143327232
468500470
313528320
700448686
637009920
34836480
82301184
435027967
23887872
14515200
6422528
1327104
286654464
580608...

result:

ok 5915 numbers

Test #15:

score: 0
Accepted
time: 21ms
memory: 3712kb

input:

1858
24 28
..........*............*..*.
.*.*..*.....**..**.*.....*..
.*......*............*......
....*.....**..*..*.*........
..*....*.....*........*.....
.*..*.....*...*.*...*..*....
*...........*.....*.....*.*.
..*..*...**..*.*..........*.
...*....*........*...*.*....
.........*.....*...*..*...*....

output:

205658642
188930089
488358228
537075042
811881878
343676454
482252033
98057161
423385524
8104889
28741020
963106435
626007234
370323562
398640084
555220908
98304
169063033
54937295
975751771
281399048
706161753
922680708
838860732
688716185
201021236
315927503
693445130
689787511
804298968
272376064...

result:

ok 1858 numbers

Test #16:

score: 0
Accepted
time: 21ms
memory: 3840kb

input:

1858
26 25
....**.*..*....*..*...*..
*.*.........**......*...*
..*.**..*..*.*..**....*..
........**..........*..*.
*..**......*.*.*.*.*..*..
*.....*.*.........*.*..*.
..*..*....*..*..*...*....
*..*...*...*.....**...*.*
..*.*.....*.*..*....*.*..
..*...*..*....*..........
.*...*.....*.**..*.*.*.*.
*.....

output:

546128209
713503274
911655276
211941187
531196829
355793831
703010765
576116445
670187176
668395211
980100088
918240857
500908466
433900492
460432408
258959590
749461993
752707535
260682304
637137141
130576735
462616195
487099803
490803018
109316894
514148295
689928905
156599735
842049672
610511220
...

result:

ok 1858 numbers

Test #17:

score: 0
Accepted
time: 18ms
memory: 3840kb

input:

1877
23 29
.............................
.................*.....*.....
..........*..................
.............................
.............................
.............................
.............................
.............................
...........*.................
...............*......

output:

4194304
1048576
409366771
188743671
154360827
846861161
746398268
234227026
64
461793440
954462528
250432608
676120441
492246208
851902181
909425908
702951336
235473855
850454424
322926165
580131195
91649993
435759875
905821774
926217812
828900475
398381710
727825719
922220762
75497472
2048
43111530...

result:

ok 1877 numbers

Test #18:

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

input:

1890
21 29
.*..*.*..*..*................
.......*...*..**.......*..*..
...*....*.........*...**.....
*....*....*.*....*...*...*..*
..*....*..*..*....*.....**...
.*...*........*....**..*....*
.*.*...*.....*..*....*..*....
.....**.*..*.*..*..*..*...*.*
*.*.................*........
*..*......*.*....*....

output:

728830581
2097152
570491197
932024412
182479048
567755620
414707403
703979022
805301664
68112616
727271934
307206334
209614831
948820296
101186214
993883939
797226280
492418646
65980984
906212682
973853991
882885652
527928315
540118517
324301867
676799524
335544088
805306368
721141125
418693056
2097...

result:

ok 1890 numbers

Test #19:

score: 0
Accepted
time: 18ms
memory: 3968kb

input:

548
48 40
..........*....*.*..*......*.*.....*..*.
.*..*..*...*.*....*...*.*.....*...*.....
*..*..*.*.*..*.*....*..*.**.*...*.*.*..*
..*.........*....*...*....*.*...*....*..
*...*.....*...*...*..*..*....*.....*...*
.......*.*..*...*..*........*..*.*.*....
*..*.*.*...*...**.....*.**......*....*.*
*.....

output:

132997637
200270283
481898022
723436828
569997080
507888744
892431292
983390655
578976942
852255560
703149140
879555747
1024
338375591
702116465
403503984
367486625
468265884
386315674
804033183
799783266
449425236
630358914
868030055
684002620
776235008
910186893
517269665
513314872
741829115
39588...

result:

ok 548 numbers

Test #20:

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

input:

570
40 49
..*.*.*.....*.............*...*.......*..*.*.....
........*..*....*.*..*..*........*..*.......*.*..
*....*...*.....*............*..*...*............*
.......*....*......*....**....*..*...*.*..*.*....
.*.*.*....*...........*....*.*..*.......*......*.
........*...*.*..*...............*..*.*....

output:

458940539
870519705
612103916
785101914
76755784
904693333
721546170
304615792
130848670
632053175
524610867
684522875
655084022
721396962
500518852
317416919
170030652
993234200
392927217
904986304
536411460
520093490
448235088
329232661
371635202
592544617
88709395
192339923
560623713
340082061
15...

result:

ok 570 numbers

Test #21:

score: 0
Accepted
time: 19ms
memory: 3968kb

input:

246
85 21
..*.*..*..*........*.
*....*.......**..*...
...*.*...*.*......*..
*..*..*...*....**....
....*...*..*.*.....*.
..*...*..*.....*.*...
*..*.*..*...*.*....*.
..........*.....**..*
.*..*..*.*...*......*
*..*.*.....*....*.*..
...*..*.*...*.*....*.
..*.......*.....*....
.*.*.*.*.*..**....*..
.......

output:

146719926
191497517
215185330
906696366
955439706
770918934
791066597
847723862
91792024
278462748
925641397
280599657
683775249
992805159
808540714
707993773
527673233
587436526
222730904
107654360
879912682
212259791
940177256
735614926
30631762
655603446
625237815
764895807
415657406
247302037
83...

result:

ok 246 numbers

Test #22:

score: 0
Accepted
time: 18ms
memory: 3968kb

input:

252
99 75
..*.*........*..*....*...............*..**..*..*...........................
......*.*...*......*..*...**.*.*..............*..*...*..*.*.*..*..*.*..*...
*......*..........*.....*........*....*.*..*....*..*...........*.*...*..*..
..*.......*...*.*...*....*..*..*...*..*..*....*..........*...*...

output:

423901413
975138163
678328276
430718827
282818450
317691033
554435565
814519543
832496913
384281902
399354247
157306445
913228111
302586272
153090466
102365247
16400806
251301007
795815790
302457837
232739439
940221092
678324952
589819379
413304350
250862702
2048
530776390
327380257
220432504
844162...

result:

ok 252 numbers

Test #23:

score: 0
Accepted
time: 18ms
memory: 3840kb

input:

142
69 90
*..*.....*...*...*.......*..*....*..*...**..*..*..*..*..*....*........*..*.*......*..*.**.
..*..*.*........*.*...**...*.*.....*.*.....*....*..*..*..*..*..*.*..........*.*.*.........
......*....*..*.....*...........*.*....*.....*......*....*....*..*.**...*.*........*...*.*
.*.**....*..*.......

output:

720251989
368859114
684761889
603344648
650016914
754005051
660106481
850437298
924109548
315591945
380290834
72672094
91564426
118955951
432160615
656479199
918339101
216214818
976760370
199995903
310686702
353531176
643504853
679148546
455995625
392375854
497090441
177214963
970422851
700771638
12...

result:

ok 142 numbers

Test #24:

score: 0
Accepted
time: 19ms
memory: 3968kb

input:

105
93 98
........*............*......................*....*.....*...........*...........*....*.........*..*
.**.......*...**.......*...............*...*.......*.*.......*...*...*...*.......*....*...........
....*.......*....*.*..*...*...*....*........*..*..........*...*.........*....*.......**....*...

output:

593526987
469742656
217281887
418252583
506377014
758877077
740754093
917130871
272707291
293518241
584279437
924480099
471068905
948988494
775551666
611675742
905098067
828366871
803974259
932872932
937409618
12369799
294883192
730984152
589604567
987350533
173873127
844109127
597254592
877552065
8...

result:

ok 105 numbers

Test #25:

score: 0
Accepted
time: 19ms
memory: 3968kb

input:

100
100 100
............................................*..........*...................*..............*.........
....**..........*...*........*...*..*....*....*.................*...*..........*...............*....
..........*..*...................................*...*........*...*...*...*.*.....*......

output:

516338517
430862722
292673763
676903399
552101595
461403896
857499355
178553860
586431629
25453142
308176647
40015191
347152997
961077115
920253472
292675548
397127412
179532805
383150538
750693349
379771523
931593202
955137760
816948091
820093465
771280488
731126697
984126272
981847284
5967281
6197...

result:

ok 100 numbers

Test #26:

score: 0
Accepted
time: 19ms
memory: 3840kb

input:

100
100 100
.*..*...*......*....*...*.*..*....*..*..**.........*....*.*..*....*..*..*...*...*.*.......**......*.
...*.*...*..**..*....*.....*...*...*...*...*.*..*.*...*........*.*..*......*...*....*..**....*..*...
*......*....*......*...*.........*...*..*.*..*......*..*..*.*.*........*.*...*..*....*...

output:

5310033
542418367
930152681
297010605
593478201
829042482
158064260
824053661
181678339
435073750
345919209
591283435
145756088
213921372
83879022
546459104
615884885
995829245
328666267
310055724
29676196
886856123
168288782
976998322
706759470
364039972
314781839
56232890
365455565
832279980
18354...

result:

ok 100 numbers

Test #27:

score: 0
Accepted
time: 18ms
memory: 3968kb

input:

100
100 100
.*..*.......*..*..*.*..*...*......*...*....*....*.......*....*......**.*.....*....*.*...........*...
......*...*......*....*..*...*.*.*..*...*....*.....*.*.*..*.*.*..*.......*.*..*......*.*..*..**....*
*..*....**.*..*....*..**...*.......*.*.*..*.*..*.*.......*.....*..*.............*.*......

output:

253391095
370538991
35235362
759675660
458398995
387449622
642489515
794708360
399741967
550641943
240443268
311436943
740859135
909605361
190393660
474734548
578043004
356785720
8423031
744814663
906175139
883891199
127747799
348487443
727327618
412346529
109598476
83651710
764696835
300792293
2125...

result:

ok 100 numbers

Test #28:

score: 0
Accepted
time: 18ms
memory: 3840kb

input:

100
100 100
....................................................................................................
....................................................................................................
.........................................................................................

output:

898680192
966380854
262144
215035077
29756974
310132748
996512660
17299793
476591870
466511680
955603014
269173589
337532371
722424964
333606374
423359968
477772912
905951522
586553083
611657518
329631272
10799809
870535721
986171667
788867075
419430366
154870757
526790362
230376176
653356566
253638...

result:

ok 100 numbers

Test #29:

score: 0
Accepted
time: 18ms
memory: 3968kb

input:

100
100 100
*...*....*.*.....*.........*....*........*..*..*...*..*.....**..*.*..*..*.....*.....*..*...*..**....
..*..*.*.....*.*..*.*.*..*..*..*..**..*....*..*...*.....*..........*..*..*..*...*.*..*...*..*.....*.
............*..*...*......*..........*..*...*...*....*.....*..*.*...*.......*..*.........

output:

225194599
390717159
676810727
491562909
196932387
390066034
827965435
205290060
601079114
883842383
340669249
48886939
513350640
53258412
179035415
1024
412314289
190494046
929654654
285883827
515630871
733930716
460569697
743760175
265945373
960186983
793056485
409985307
55988811
562597187
83110039...

result:

ok 100 numbers

Test #30:

score: 0
Accepted
time: 17ms
memory: 3840kb

input:

100
100 100
.....*...........*....*......*.............*..*.*......*.*..........................*..*.*.*........
..*....*..*.........*....*......*.*..*...*........*......................*.*......*...........*.*.*.
...*.....*....*...*.......*.*.......*............*..**.*.....*....*..*.....*.*...*...*...

output:

225084989
214841570
243963965
356780547
642485747
27193254
802755049
723220071
165265798
341135115
399169786
602437491
723406508
919388361
426512378
903612861
643185009
480263800
424257624
693764595
718307826
408905677
506581427
401049899
734703753
218708197
782271252
741049034
811271218
213206325
2...

result:

ok 100 numbers

Test #31:

score: 0
Accepted
time: 18ms
memory: 3968kb

input:

100
100 100
*.*........*.*..*....*........*...**..**.*....*....*.*.*.*..*.**....*...*...*....*.*..*....*..*.....
....*.*.*..........*...*..*.*...*...........*...**........*......**...*...*....*.........*...*..**..
.*.*.*....*.*.*..*..*....*.....**...*.*....*..*.......*.......*....*...*...*..*...*..*...

output:

334373568
990391522
668332222
856471901
832826375
173826736
508569437
385159136
3817257
605116090
115065067
689320653
654367828
957885691
305147608
97526022
564778957
403453667
881290167
668803931
850765192
934689533
279385861
52228644
240653398
726435420
776699747
930524078
348890667
600525540
5790...

result:

ok 100 numbers

Test #32:

score: 0
Accepted
time: 17ms
memory: 3968kb

input:

100
100 100
...*....*.......**.*...*.......*.**....*.........*...*.*...*..........*..**..*.*....*.*..**....*....
..*..**...*..*.*.........*..*.*.....**...*...*.*....*.....*...*.**..*............**.........*.*.*..*
*.*...*.*.....*.*...*.....*.....*.......*..*.......*....*...*...........*....*.......*...

output:

831807145
647573287
687522371
744192876
663822225
728939700
244665760
97643171
687085909
475099598
359720560
300548821
51137675
150239075
963512100
394756083
215817368
458066883
851982641
944172642
815209230
301757413
19461457
817293487
423549068
624424836
311024201
338221200
37364854
632561308
9879...

result:

ok 100 numbers

Test #33:

score: 0
Accepted
time: 19ms
memory: 3968kb

input:

100
100 100
.....*......*.........*..*......*..*.........*.......*..*.....*...........*.....*...................
...*............*.*.......*...*......*............*......*......*.*..*.*.....*....*..**....*...*.*..
..*...*.*.*.................*.........*.....*.........*......*.......*...*....*..........

output:

679034809
882721606
545231409
237509416
575522621
747694381
477468225
299090060
355339005
710825848
412176228
962621758
882548281
583107826
982128215
119276827
131119739
69444782
481707007
143239590
936452074
490240943
850528782
707762811
716298304
413922282
521128988
951578573
294339966
294560463
6...

result:

ok 100 numbers

Test #34:

score: 0
Accepted
time: 19ms
memory: 3968kb

input:

100
100 100
*..*...*.*............*..*..*..*...*..*.....*............*.......*.....*...*.*...**...*...**.*...*..
..*..*....*.....*.**...*..*..*......*....**...*..*..*..*...**..*....**....*....*.....*..*.........*.
*.....*.....*.*..*......*........*.....*..........*.....*....*..*.*.*...*...*...**.*.....

output:

383569872
238319621
902920673
156763279
922520420
73139390
333746769
561854997
947680080
777146266
935077213
654244922
541636629
182469559
292451003
66880826
151812597
683190652
930119480
242195819
683513808
524353000
490032080
992621561
856787143
395345131
933248973
472289081
513326593
795606511
68...

result:

ok 100 numbers

Test #35:

score: 0
Accepted
time: 17ms
memory: 3840kb

input:

100
100 100
*.........*..*..*....*......*.*..*.*.....*..*.*..*..*....*....*.......*...*.......*.......*......**.
..*.*...*...*......*...*.**....*.....*.....*....*..*...*....*....*.*....*.....*..*..**..*...*..*....
......*..*.*..*..**..*.*.*..**......*...**.*..*......**...*....*.....*......*..*..*.*....

output:

962989870
671435079
622262142
470954865
636703911
604855448
459421739
66269136
17150830
266229573
116193093
305753742
711304042
748238414
603638616
904336867
525557802
611778104
730076431
287633763
806073864
316736465
113187677
687064285
928339968
491234930
506127282
82718792
870808886
129474118
995...

result:

ok 100 numbers

Test #36:

score: 0
Accepted
time: 19ms
memory: 3968kb

input:

100
100 100
............*.......*.........*..........*.*.....*............*...........*.*..*.*......*...........
......................*....*...*.....*..*.....*....*.*...*.*..........*..*...*.......*.........*....
..**...*...*..**.*......*.*..*.................................*...*...*......*...*......

output:

841970744
234964827
467121258
91770777
537346533
298558683
766891385
95404219
791402767
605169223
31912306
729782201
668456854
470794205
791691828
971491350
751069504
85483479
79309021
673616734
543737878
896170615
903064866
31849849
523219999
687066303
947422026
773892604
902811604
563176977
667716...

result:

ok 100 numbers

Test #37:

score: 0
Accepted
time: 17ms
memory: 3968kb

input:

100
100 100
...*....*..*..*...*.......*....*..........*....*.......**.....*.*....*.....*....*.....*.........*...
*...*.*...*.....*....*...*..**..*..*..*..*.*.....*....*...*......*.*....**....*...*..*...*.*........
..*......*.*.*.....*....*..*...*.*..*..*.*....*...**........*..*......*.*.....*...*......

output:

566976194
990382392
515970543
366839356
233440188
246686692
881880844
708248544
413687844
725696029
34727943
370434643
28998220
90298117
660349969
644531396
951986643
852257685
544200588
14027936
396782125
553342227
183719918
260475443
105548997
117779038
608867812
11643880
46661065
614421287
372347...

result:

ok 100 numbers

Test #38:

score: 0
Accepted
time: 21ms
memory: 3968kb

input:

100
100 100
.**...**...*.*...**..**..*.*.*.....*....*....*....**....*....*...*.....*.......*.*.*.............**.
...*.....*.....*....*...........**...**.....*..*.*..*.*..*.....*...*.*....*..*.......**..*.*..**....
.....*..*...*.*.*..*...*..*.*.*.......*..**...*.*......*...*..*.*.......*.**...*..**.....

output:

907461866
34592350
776832817
511759162
638192038
696126026
503576766
938080232
160862139
574541317
460997380
163269668
365821404
613565586
262702965
585151120
682068056
604387946
910401399
614219234
270939444
35319419
350396271
642737246
990176645
286918001
984856923
496806329
703163472
335225619
61...

result:

ok 100 numbers