QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#486106#6743. water235GuanYunchangAC ✓76ms49932kbC++17597b2024-07-21 16:19:362024-07-21 16:19:36

详细

Test #1:

score: 100
Accepted
time: 6ms
memory: 27008kb

input:

2 1

output:

2
1  
1  

result:

ok The answer is correct.

Test #2:

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

input:

3 3

output:

3
1  0  1  
0  0  0  
1  0  0  

result:

ok The answer is correct.

Test #3:

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

input:

1 4

output:

3
1  1  0  1  

result:

ok The answer is correct.

Test #4:

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

input:

2 2

output:

2
0  1  
1  0  

result:

ok The answer is correct.

Test #5:

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

input:

2 4

output:

3
0  1  0  1  
1  0  0  0  

result:

ok The answer is correct.

Test #6:

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

input:

4 3

output:

4
1  0  1  
1  0  0  
0  0  0  
1  0  0  

result:

ok The answer is correct.

Test #7:

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

input:

4 4

output:

4
0  1  0  1  
1  0  0  0  
0  0  0  0  
1  0  0  0  

result:

ok The answer is correct.

Test #8:

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

input:

1 789

output:

395
1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1 ...

result:

ok The answer is correct.

Test #9:

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

input:

2 444

output:

223
0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0 ...

result:

ok The answer is correct.

Test #10:

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

input:

2 445

output:

224
1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1 ...

result:

ok The answer is correct.

Test #11:

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

input:

3 333

output:

168
1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1 ...

result:

ok The answer is correct.

Test #12:

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

input:

3 332

output:

168
1  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0 ...

result:

ok The answer is correct.

Test #13:

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

input:

224 4

output:

114
0  1  0  1  
1  0  0  0  
0  0  0  0  
1  0  0  0  
0  0  0  0  
1  0  0  0  
0  0  0  0  
1  0  0  0  
0  0  0  0  
1  0  0  0  
0  0  0  0  
1  0  0  0  
0  0  0  0  
1  0  0  0  
0  0  0  0  
1  0  0  0  
0  0  0  0  
1  0  0  0  
0  0  0  0  
1  0  0  0  
0  0  0  0  
1  0  0  0  
0  0  0  0...

result:

ok The answer is correct.

Test #14:

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

input:

31 31

output:

31
1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  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  
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  ...

result:

ok The answer is correct.

Test #15:

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

input:

31 30

output:

31
1  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  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  
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  ...

result:

ok The answer is correct.

Test #16:

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

input:

128 128

output:

128
0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0 ...

result:

ok The answer is correct.

Test #17:

score: 0
Accepted
time: 51ms
memory: 34748kb

input:

1000 1000

output:

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

result:

ok The answer is correct.

Test #18:

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

input:

1 1

output:

1
1  

result:

ok The answer is correct.

Test #19:

score: 0
Accepted
time: 44ms
memory: 34780kb

input:

999 999

output:

999
1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1 ...

result:

ok The answer is correct.

Test #20:

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

input:

2 499999

output:

250001
1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0 ...

result:

ok The answer is correct.

Test #21:

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

input:

1 999999

output:

500000
1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0 ...

result:

ok The answer is correct.

Test #22:

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

input:

10 99998

output:

50004
0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  ...

result:

ok The answer is correct.

Test #23:

score: 0
Accepted
time: 44ms
memory: 34852kb

input:

100 10000

output:

5050
0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0...

result:

ok The answer is correct.

Test #24:

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

input:

99 9999

output:

5049
1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1...

result:

ok The answer is correct.

Test #25:

score: 0
Accepted
time: 44ms
memory: 37288kb

input:

9998 99

output:

5049
1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1...

result:

ok The answer is correct.

Test #26:

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

input:

1000 999

output:

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

result:

ok The answer is correct.

Test #27:

score: 0
Accepted
time: 76ms
memory: 49932kb

input:

488889 2

output:

244446
1  1  
0  0  
1  0  
0  0  
1  0  
0  0  
1  0  
0  0  
1  0  
0  0  
1  0  
0  0  
1  0  
0  0  
1  0  
0  0  
1  0  
0  0  
1  0  
0  0  
1  0  
0  0  
1  0  
0  0  
1  0  
0  0  
1  0  
0  0  
1  0  
0  0  
1  0  
0  0  
1  0  
0  0  
1  0  
0  0  
1  0  
0  0  
1  0  
0  0  
1  0  
0  0  ...

result:

ok The answer is correct.

Test #28:

score: 0
Accepted
time: 50ms
memory: 35408kb

input:

31112 31

output:

15572
1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  
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  
1  0  0  0  ...

result:

ok The answer is correct.

Test #29:

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

input:

3111 310

output:

1711
1  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0...

result:

ok The answer is correct.