QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#505586#3425. Coast Lengthxiaowuc1AC ✓277ms78012kbJava82.7kb2024-08-05 06:17:442024-08-05 06:17:44

詳細信息

Test #1:

score: 100
Accepted
time: 38ms
memory: 39296kb

input:

1 1
1

output:

4

result:

ok single line: '4'

Test #2:

score: 0
Accepted
time: 40ms
memory: 39140kb

input:

1 1
0

output:

0

result:

ok single line: '0'

Test #3:

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

input:

2 1
1
0

output:

4

result:

ok single line: '4'

Test #4:

score: 0
Accepted
time: 40ms
memory: 39744kb

input:

1 2
11

output:

6

result:

ok single line: '6'

Test #5:

score: 0
Accepted
time: 30ms
memory: 38188kb

input:

2 2
10
01

output:

8

result:

ok single line: '8'

Test #6:

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

input:

3 3
111
101
111

output:

12

result:

ok single line: '12'

Test #7:

score: 0
Accepted
time: 39ms
memory: 36916kb

input:

3 3
100
010
010

output:

10

result:

ok single line: '10'

Test #8:

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

input:

7 7
1000000
1011110
1010010
1011010
1000010
1111110
0000000

output:

44

result:

ok single line: '44'

Test #9:

score: 0
Accepted
time: 30ms
memory: 38496kb

input:

3 3
111
101
111

output:

12

result:

ok single line: '12'

Test #10:

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

input:

10 10
1011001100
1100010010
0110111111
1010101011
1110001111
0011001000
0011011011
1100100010
1111110100
1100100010

output:

92

result:

ok single line: '92'

Test #11:

score: 0
Accepted
time: 33ms
memory: 37504kb

input:

10 10
0101111111
1011101111
1100111111
1111111001
0010110011
1110010001
1101111111
1111011111
1011011111
1110100101

output:

52

result:

ok single line: '52'

Test #12:

score: 0
Accepted
time: 45ms
memory: 38084kb

input:

10 10
0000010000
0010001000
1000101001
0000000000
0110100010
1010000100
1000000101
0000000010
0000000010
0000010000

output:

68

result:

ok single line: '68'

Test #13:

score: 0
Accepted
time: 62ms
memory: 41384kb

input:

201 251
11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111...

output:

3588

result:

ok single line: '3588'

Test #14:

score: 0
Accepted
time: 115ms
memory: 45544kb

input:

400 300
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

output:

3404

result:

ok single line: '3404'

Test #15:

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

input:

200 320
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

output:

7372

result:

ok single line: '7372'

Test #16:

score: 0
Accepted
time: 277ms
memory: 72520kb

input:

1000 1000
10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

output:

999002

result:

ok single line: '999002'

Test #17:

score: 0
Accepted
time: 248ms
memory: 70408kb

input:

1000 1000
11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

output:

999002

result:

ok single line: '999002'

Test #18:

score: 0
Accepted
time: 178ms
memory: 45700kb

input:

1000 1000
11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

output:

3996

result:

ok single line: '3996'

Test #19:

score: 0
Accepted
time: 239ms
memory: 69504kb

input:

1000 1000
10011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110...

output:

1001000

result:

ok single line: '1001000'

Test #20:

score: 0
Accepted
time: 247ms
memory: 69456kb

input:

1000 1000
01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

output:

3996

result:

ok single line: '3996'

Test #21:

score: 0
Accepted
time: 269ms
memory: 66620kb

input:

1000 1000
00111110111111100000001000111111000111000111110011111000000111111000000001111111111000011111111001110011110011111111110000011111111111111100011110111110001110000000111111111000000000010000000001111110011000011111110001111000011111000000000000001111111111110011111100000000111101111111111110...

output:

362014

result:

ok single line: '362014'

Test #22:

score: 0
Accepted
time: 130ms
memory: 50964kb

input:

1000 1000
01111110001101111011011011110100101000111111011001100110101111111101101000010000111101000010111110111010100000101110110001111011010111010100011000010011011111010100010110010010000101101000011011100110100001011101000010101010000011001011110101001100001101010010001101000111000010001010110111...

output:

21242

result:

ok single line: '21242'

Test #23:

score: 0
Accepted
time: 254ms
memory: 78012kb

input:

999 999
0001000111000000011000010000000001111111010111100100000010010011001011000000000100000000010100101000010011000010100001011011000010010100000100100100000100010010100000010100010001000000111010000000100101001100110001101011000010000010001110110110110000100001000000101001101001011111001110000010...

output:

802314

result:

ok single line: '802314'

Test #24:

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

input:

1 1000
11111111011110111101111111001011101011111011001110010100111111111000110101001111111011101011110101011111101101101000010111110111001101110011101111000111111101100010110011001011110000101001001101010001011101100011111011011111101110101101101000110000000111000111111111101011111101011000001101111...

output:

1790

result:

ok single line: '1790'

Test #25:

score: 0
Accepted
time: 47ms
memory: 39572kb

input:

1000 1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0...

output:

186

result:

ok single line: '186'