QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#73126#1882. DrunkardslarryzhongAC ✓75ms199532kbC++17852b2023-01-22 12:49:482023-01-22 12:49:49

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 2ms
memory: 3508kb

input:

2 28
1 1

output:

702764025

result:

ok 1 number(s): "702764025"

Test #2:

score: 0
Accepted
time: 2ms
memory: 5580kb

input:

5 50
-1 1 -1 -1 -1

output:

17015529

result:

ok 1 number(s): "17015529"

Test #3:

score: 0
Accepted
time: 2ms
memory: 3652kb

input:

5 50
-1 1 -1 1 1

output:

680621150

result:

ok 1 number(s): "680621150"

Test #4:

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

input:

10 50
1 1 1 1 1 -1 -1 -1 1 1

output:

812744705

result:

ok 1 number(s): "812744705"

Test #5:

score: 0
Accepted
time: 2ms
memory: 3660kb

input:

10 50
-1 -1 1 1 -1 -1 1 -1 -1 -1

output:

158575275

result:

ok 1 number(s): "158575275"

Test #6:

score: 0
Accepted
time: 2ms
memory: 3668kb

input:

15 65
1 -1 -1 -1 1 -1 -1 -1 1 -1 1 1 -1 -1 1

output:

553313087

result:

ok 1 number(s): "553313087"

Test #7:

score: 0
Accepted
time: 2ms
memory: 3584kb

input:

15 65
-1 -1 1 -1 -1 -1 1 1 -1 1 -1 -1 1 -1 -1

output:

140408188

result:

ok 1 number(s): "140408188"

Test #8:

score: 0
Accepted
time: 2ms
memory: 5640kb

input:

10 7
1 1 1 1 1 1 1 1 1 1

output:

375530019

result:

ok 1 number(s): "375530019"

Test #9:

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

input:

10 73
-1 -1 -1 -1 -1 -1 -1 -1 -1 -1

output:

289966217

result:

ok 1 number(s): "289966217"

Test #10:

score: 0
Accepted
time: 2ms
memory: 3564kb

input:

10 0
1 1 -1 1 1 1 -1 1 -1 1

output:

95070891

result:

ok 1 number(s): "95070891"

Test #11:

score: 0
Accepted
time: 2ms
memory: 3708kb

input:

10 0
1 1 1 -1 1 1 1 1 1 1

output:

570425345

result:

ok 1 number(s): "570425345"

Test #12:

score: 0
Accepted
time: 2ms
memory: 3668kb

input:

10 0
-1 1 1 1 -1 1 -1 -1 1 1

output:

475354454

result:

ok 1 number(s): "475354454"

Test #13:

score: 0
Accepted
time: 2ms
memory: 3676kb

input:

10 0
-1 -1 -1 -1 -1 -1 1 -1 1 -1

output:

332748118

result:

ok 1 number(s): "332748118"

Test #14:

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

input:

10 0
1 1 1 1 1 1 -1 1 1 1

output:

570425345

result:

ok 1 number(s): "570425345"

Test #15:

score: 0
Accepted
time: 2ms
memory: 3816kb

input:

10 0
-1 -1 -1 1 1 1 -1 1 -1 1

output:

475354454

result:

ok 1 number(s): "475354454"

Test #16:

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

input:

10 0
-1 1 1 1 1 -1 -1 1 -1 1

output:

95070891

result:

ok 1 number(s): "95070891"

Test #17:

score: 0
Accepted
time: 1ms
memory: 3596kb

input:

10 100
-1 1 -1 1 1 -1 -1 -1 -1 -1

output:

617960790

result:

ok 1 number(s): "617960790"

Test #18:

score: 0
Accepted
time: 2ms
memory: 3592kb

input:

10 100
1 1 1 1 1 1 -1 1 1 1

output:

617960790

result:

ok 1 number(s): "617960790"

Test #19:

score: 0
Accepted
time: 2ms
memory: 3832kb

input:

10 100
-1 -1 -1 -1 1 1 -1 -1 1 1

output:

617960790

result:

ok 1 number(s): "617960790"

Test #20:

score: 0
Accepted
time: 2ms
memory: 3668kb

input:

10 27
1 -1 -1 1 -1 -1 1 -1 -1 1

output:

89502877

result:

ok 1 number(s): "89502877"

Test #21:

score: 0
Accepted
time: 2ms
memory: 5588kb

input:

10 27
1 1 -1 1 -1 1 1 -1 -1 1

output:

602378374

result:

ok 1 number(s): "602378374"

Test #22:

score: 0
Accepted
time: 57ms
memory: 199264kb

input:

5000 25
1 1 1 -1 -1 -1 1 1 1 1 1 1 1 1 1 1 -1 -1 -1 -1 1 -1 -1 -1 -1 -1 1 1 1 -1 1 -1 1 1 1 1 1 1 1 1 -1 1 1 -1 -1 -1 1 -1 1 -1 1 1 -1 -1 -1 -1 1 -1 1 -1 -1 1 -1 -1 -1 1 1 -1 1 1 1 -1 -1 1 1 -1 -1 1 1 1 -1 1 1 -1 1 1 1 -1 1 -1 -1 1 -1 -1 -1 1 -1 1 1 1 -1 -1 -1 -1 -1 1 1 1 -1 -1 -1 1 -1 -1 1 1 -1 -1 ...

output:

961556565

result:

ok 1 number(s): "961556565"

Test #23:

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

input:

5000 25
1 -1 1 1 1 1 1 -1 -1 1 1 -1 1 -1 1 1 1 1 1 1 1 -1 1 1 -1 -1 1 1 -1 -1 1 1 1 1 1 -1 1 1 1 1 -1 1 -1 1 -1 1 -1 -1 -1 -1 1 1 -1 -1 -1 -1 1 -1 1 1 1 -1 -1 1 1 -1 -1 -1 1 1 -1 1 -1 -1 1 1 -1 1 1 1 1 1 1 -1 1 -1 1 1 -1 1 -1 -1 1 -1 -1 -1 1 1 1 -1 1 1 1 1 1 -1 1 1 1 1 -1 -1 -1 1 -1 1 1 1 1 -1 -1 1 ...

output:

234465387

result:

ok 1 number(s): "234465387"

Test #24:

score: 0
Accepted
time: 52ms
memory: 198404kb

input:

5000 25
-1 -1 1 -1 1 1 -1 1 1 -1 1 -1 -1 -1 -1 -1 -1 1 -1 1 1 -1 -1 1 -1 -1 -1 1 -1 -1 1 -1 -1 1 -1 -1 -1 -1 1 1 -1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 1 -1 1 1 1 1 -1 1 1 -1 -1 -1 -1 1 -1 1 1 1 1 -1 1 1 1 1 1 1 -1 -1 -1 1 1 1 1 -1 1 1 1 1 1 -1 -1 1 1 1 -1 1 -1 -1 1 -1 1 -1 1 -1 -1 1 1 1 1 1 -1 -1 1 1 1 1...

output:

836059165

result:

ok 1 number(s): "836059165"

Test #25:

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

input:

5000 25
-1 1 -1 -1 1 -1 1 -1 1 -1 -1 1 1 1 1 -1 1 -1 1 -1 1 1 1 1 1 1 -1 1 1 -1 1 -1 -1 -1 1 -1 1 1 1 1 1 -1 -1 1 -1 1 -1 1 -1 -1 -1 1 -1 1 -1 -1 -1 -1 -1 1 1 1 -1 -1 1 -1 1 1 -1 1 1 1 1 1 1 -1 -1 1 1 1 1 -1 -1 -1 -1 -1 1 1 1 1 1 -1 -1 -1 -1 1 -1 -1 -1 1 -1 -1 1 1 1 -1 1 1 -1 1 -1 1 1 -1 -1 -1 1 1 1...

output:

747198137

result:

ok 1 number(s): "747198137"

Test #26:

score: 0
Accepted
time: 53ms
memory: 198392kb

input:

5000 25
1 1 -1 1 -1 1 1 -1 1 -1 -1 -1 1 -1 -1 -1 -1 -1 1 -1 -1 -1 1 -1 1 1 -1 1 -1 1 -1 1 1 -1 1 1 1 1 -1 -1 1 1 1 -1 -1 1 1 -1 1 -1 -1 -1 -1 -1 -1 1 -1 -1 1 -1 -1 -1 1 1 1 1 -1 1 -1 1 -1 1 1 -1 -1 1 -1 1 1 -1 1 -1 1 -1 1 1 -1 -1 -1 -1 1 -1 1 1 1 1 1 1 -1 1 -1 1 -1 -1 1 -1 1 -1 1 1 1 1 -1 1 -1 -1 1 ...

output:

915679440

result:

ok 1 number(s): "915679440"

Test #27:

score: 0
Accepted
time: 38ms
memory: 197480kb

input:

5000 25
-1 1 1 -1 -1 1 -1 1 1 -1 1 -1 1 1 -1 -1 1 -1 1 1 -1 -1 1 -1 -1 1 -1 1 -1 -1 1 -1 -1 1 -1 -1 1 1 1 -1 -1 1 -1 -1 -1 1 -1 1 1 -1 -1 1 1 1 -1 1 -1 -1 1 -1 1 1 1 -1 1 -1 1 1 -1 -1 1 -1 1 1 -1 -1 -1 -1 1 -1 -1 -1 1 1 1 1 1 1 -1 -1 -1 1 1 -1 -1 -1 -1 1 1 1 -1 -1 1 1 -1 -1 -1 -1 1 1 1 -1 1 1 -1 -1 ...

output:

129598521

result:

ok 1 number(s): "129598521"

Test #28:

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

input:

5000 25
-1 1 1 1 -1 -1 -1 1 1 -1 1 -1 1 1 -1 -1 -1 1 -1 -1 1 -1 1 -1 1 -1 -1 -1 -1 1 -1 -1 -1 1 -1 -1 -1 1 -1 1 -1 1 -1 1 1 -1 1 -1 1 -1 -1 -1 -1 -1 1 -1 1 1 -1 -1 1 -1 -1 1 -1 1 -1 -1 1 1 -1 -1 1 -1 1 1 1 -1 1 -1 1 -1 -1 1 -1 -1 -1 -1 -1 -1 1 -1 1 1 -1 -1 -1 -1 1 -1 1 -1 1 1 1 1 1 -1 -1 -1 -1 1 1 1...

output:

678292635

result:

ok 1 number(s): "678292635"

Test #29:

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

input:

5000 25
-1 -1 -1 1 -1 1 1 1 -1 1 1 -1 1 1 1 1 1 -1 -1 -1 1 1 1 1 1 -1 1 -1 1 -1 -1 1 1 1 1 1 1 -1 -1 -1 -1 -1 -1 1 1 1 1 1 -1 -1 -1 -1 -1 1 1 -1 -1 1 -1 1 -1 1 1 -1 -1 1 -1 -1 1 1 1 -1 1 1 1 1 -1 1 -1 1 1 -1 1 -1 -1 1 1 1 -1 1 1 -1 -1 -1 1 1 1 -1 1 -1 1 1 1 1 -1 -1 1 -1 -1 -1 1 -1 1 1 1 -1 -1 -1 1 -...

output:

570879180

result:

ok 1 number(s): "570879180"

Test #30:

score: 0
Accepted
time: 48ms
memory: 199016kb

input:

5000 25
-1 1 -1 -1 1 -1 -1 -1 1 -1 1 -1 -1 -1 1 -1 -1 -1 1 1 -1 -1 1 1 -1 -1 1 -1 1 -1 -1 1 1 -1 1 1 -1 1 1 1 1 -1 -1 -1 1 -1 -1 -1 1 1 1 -1 -1 1 1 -1 -1 1 -1 1 -1 -1 1 -1 -1 1 1 1 1 -1 1 -1 1 1 1 -1 1 1 1 1 -1 1 1 1 -1 1 -1 1 -1 -1 -1 -1 1 1 -1 1 1 -1 1 1 1 -1 -1 1 1 -1 1 -1 1 -1 -1 1 -1 1 -1 -1 -1...

output:

497284899

result:

ok 1 number(s): "497284899"

Test #31:

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

input:

5000 25
1 -1 -1 -1 1 1 -1 1 -1 1 1 1 -1 -1 1 -1 -1 -1 -1 -1 1 -1 -1 1 -1 1 -1 1 1 1 -1 -1 1 1 -1 -1 -1 -1 1 1 1 1 -1 1 -1 1 1 -1 -1 1 1 -1 1 1 -1 1 1 -1 1 -1 1 1 -1 1 1 -1 1 1 -1 1 1 1 1 -1 -1 1 1 1 -1 1 -1 -1 -1 -1 -1 1 1 1 -1 -1 -1 -1 1 -1 1 1 -1 -1 1 -1 1 -1 -1 -1 1 1 -1 -1 -1 -1 1 -1 1 -1 -1 -1 ...

output:

547200460

result:

ok 1 number(s): "547200460"

Test #32:

score: 0
Accepted
time: 48ms
memory: 198272kb

input:

5000 25
-1 1 -1 1 -1 1 1 -1 1 1 -1 1 -1 -1 -1 -1 -1 1 -1 -1 -1 -1 -1 1 -1 1 -1 1 1 1 1 -1 1 -1 1 1 1 1 -1 -1 -1 1 -1 -1 1 -1 -1 -1 1 1 -1 1 -1 1 -1 -1 -1 -1 -1 1 1 -1 -1 1 -1 1 -1 1 1 1 -1 1 1 1 -1 -1 -1 -1 1 -1 1 1 1 1 -1 1 -1 1 -1 1 -1 -1 1 -1 -1 1 -1 1 -1 1 1 1 1 1 1 1 -1 -1 -1 1 1 -1 -1 1 1 1 1 ...

output:

431564537

result:

ok 1 number(s): "431564537"

Test #33:

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

input:

5000 25
-1 1 -1 1 -1 1 -1 -1 -1 1 -1 -1 1 -1 -1 -1 1 1 -1 -1 -1 -1 1 -1 -1 1 -1 1 -1 -1 1 -1 1 1 1 1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 -1 -1 -1 1 -1 1 1 -1 -1 -1 1 1 -1 -1 -1 1 -1 -1 1 -1 -1 -1 -1 1 -1 1 -1 1 -1 -1 -1 -1 1 1 -1 1 -1 1 -1 1 -1 1 1 1 1 1 1 -1 -1 1 1 1 -1 1 1 -1 -1 -1 -1 1 -1 1 -1 1 1 -1 1...

output:

944967577

result:

ok 1 number(s): "944967577"

Test #34:

score: 0
Accepted
time: 57ms
memory: 197680kb

input:

5000 25
-1 -1 -1 -1 1 1 1 1 1 -1 -1 -1 1 -1 -1 -1 -1 1 -1 1 1 -1 -1 -1 -1 -1 1 -1 1 -1 -1 -1 -1 -1 1 1 -1 -1 -1 -1 -1 1 1 1 1 -1 1 -1 -1 -1 1 -1 1 -1 1 1 1 1 1 1 -1 -1 1 1 -1 -1 -1 -1 -1 -1 1 -1 -1 1 -1 -1 1 1 1 -1 -1 1 1 1 -1 -1 1 1 -1 1 -1 -1 1 1 1 -1 -1 -1 -1 -1 -1 -1 1 -1 1 1 -1 1 1 -1 -1 1 -1 1...

output:

205819355

result:

ok 1 number(s): "205819355"

Test #35:

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

input:

5000 25
-1 1 1 -1 1 -1 -1 1 1 -1 1 1 -1 -1 1 1 -1 1 1 -1 -1 -1 1 1 1 1 -1 1 -1 -1 1 -1 -1 1 1 -1 -1 -1 1 -1 -1 1 -1 -1 -1 1 -1 -1 1 -1 1 -1 -1 1 -1 -1 1 1 -1 1 -1 -1 1 1 -1 -1 1 1 -1 -1 1 1 1 -1 -1 -1 -1 -1 -1 -1 -1 1 1 -1 -1 -1 1 1 1 1 1 -1 -1 -1 -1 -1 1 1 1 -1 -1 1 -1 -1 1 1 -1 -1 -1 1 1 -1 -1 1 1...

output:

307666691

result:

ok 1 number(s): "307666691"

Test #36:

score: 0
Accepted
time: 59ms
memory: 197860kb

input:

5000 25
1 -1 1 -1 1 1 -1 1 1 -1 -1 -1 -1 -1 -1 1 1 1 1 -1 -1 -1 1 -1 -1 1 -1 -1 -1 1 1 -1 1 1 1 1 -1 -1 1 1 1 -1 -1 -1 -1 1 1 1 1 1 1 -1 -1 -1 -1 1 1 -1 -1 -1 1 1 -1 -1 1 1 -1 1 -1 -1 -1 1 1 1 1 1 1 -1 1 -1 1 -1 -1 -1 -1 1 -1 1 -1 -1 -1 1 -1 -1 -1 1 -1 1 1 1 1 -1 -1 -1 1 1 -1 1 -1 -1 -1 -1 -1 1 1 1 ...

output:

975555440

result:

ok 1 number(s): "975555440"

Test #37:

score: 0
Accepted
time: 38ms
memory: 198428kb

input:

5000 25
-1 1 1 1 1 1 1 -1 -1 -1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 -1 1 -1 1 -1 1 1 -1 1 1 1 -1 1 1 -1 1 1 1 1 -1 -1 1 1 1 1 -1 1 -1 1 1 -1 -1 1 -1 1 1 1 -1 -1 1 1 1 1 1 1 -1 -1 1 -1 1 -1 1 1 1 -1 -1 1 1 -1 -1 1 -1 1 -1 1 1 1 -1 1 1 1 1 1 1 1 1 -1 1 -1 -1 -1 -1 -1 1 -1 1 -1 -1 1 -1 -1 1 1 -1 -1 -...

output:

954115106

result:

ok 1 number(s): "954115106"

Test #38:

score: 0
Accepted
time: 48ms
memory: 198668kb

input:

5000 25
1 1 -1 1 1 -1 -1 -1 1 -1 -1 -1 1 -1 -1 1 -1 -1 1 1 -1 -1 1 -1 -1 -1 1 -1 1 1 1 -1 1 1 1 -1 -1 -1 -1 1 1 -1 -1 1 1 -1 -1 -1 1 -1 1 -1 -1 -1 -1 1 1 -1 1 -1 1 -1 -1 -1 -1 -1 -1 -1 1 -1 -1 -1 1 1 1 1 -1 1 1 -1 1 -1 -1 1 1 1 1 1 1 1 1 -1 -1 -1 1 1 1 -1 1 -1 -1 -1 -1 -1 -1 -1 1 -1 -1 1 -1 1 -1 1 -...

output:

20240102

result:

ok 1 number(s): "20240102"

Test #39:

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

input:

5000 25
-1 1 1 -1 1 -1 1 -1 1 1 1 1 -1 -1 -1 1 -1 -1 1 1 1 1 1 -1 1 1 1 1 1 1 -1 1 -1 -1 -1 -1 1 1 -1 -1 -1 -1 -1 -1 -1 -1 1 1 -1 -1 1 1 -1 1 -1 1 -1 -1 1 -1 -1 1 -1 1 -1 -1 -1 1 -1 -1 1 1 1 -1 1 -1 -1 1 1 -1 1 1 1 1 -1 1 1 1 1 1 -1 -1 -1 1 1 1 -1 1 -1 -1 1 -1 -1 -1 1 1 1 1 1 1 -1 -1 -1 1 -1 1 1 -1 ...

output:

888096663

result:

ok 1 number(s): "888096663"

Test #40:

score: 0
Accepted
time: 38ms
memory: 198360kb

input:

5000 25
-1 1 1 1 1 1 1 1 -1 1 1 -1 -1 1 -1 1 -1 1 -1 -1 1 1 -1 1 1 1 -1 -1 1 1 -1 1 1 1 -1 1 -1 1 -1 1 1 -1 1 1 1 1 -1 -1 -1 1 -1 1 1 -1 -1 1 -1 1 1 -1 1 1 -1 1 1 1 1 -1 1 1 1 1 1 1 -1 -1 1 -1 1 -1 1 -1 -1 -1 1 1 1 1 -1 1 1 -1 -1 1 1 -1 -1 1 -1 1 1 1 -1 -1 1 1 -1 -1 -1 -1 1 1 -1 -1 -1 1 1 1 -1 -1 1 ...

output:

753978167

result:

ok 1 number(s): "753978167"

Test #41:

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

input:

5000 45
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

output:

377962368

result:

ok 1 number(s): "377962368"

Test #42:

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

input:

5000 45
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 -1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 -1 1 1 -1 1 1 1 1...

output:

262524907

result:

ok 1 number(s): "262524907"

Test #43:

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

input:

5000 45
1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 -1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 -1 1 1 1 1 ...

output:

684504852

result:

ok 1 number(s): "684504852"

Test #44:

score: 0
Accepted
time: 35ms
memory: 198916kb

input:

5000 45
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 -1 1 1 1 1 1 -1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 ...

output:

256186185

result:

ok 1 number(s): "256186185"

Test #45:

score: 0
Accepted
time: 57ms
memory: 199040kb

input:

5000 45
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 -1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

56452003

result:

ok 1 number(s): "56452003"

Test #46:

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

input:

5000 45
-1 -1 -1 -1 1 -1 -1 -1 -1 -1 -1 -1 1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 1 -1 1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -...

output:

353171752

result:

ok 1 number(s): "353171752"

Test #47:

score: 0
Accepted
time: 46ms
memory: 198712kb

input:

5000 45
1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 1 -1 -1 -1 -1 -1 -1 -1 1 1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 1 -1 -1 -1 -1 -...

output:

494279764

result:

ok 1 number(s): "494279764"

Test #48:

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

input:

5000 45
-1 -1 -1 -1 -1 1 -1 -1 -1 -1 -1 -1 -1 -1 -1 1 -1 -1 -1 -1 -1 -1 -1 1 -1 -1 -1 -1 1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 1 -1 -1 -1 1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1...

output:

863796400

result:

ok 1 number(s): "863796400"

Test #49:

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

input:

5000 45
-1 -1 -1 -1 1 -1 -1 1 -1 -1 -1 -1 -1 -1 -1 -1 1 -1 -1 -1 -1 -1 1 -1 -1 -1 1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 1 -1 1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -...

output:

883427667

result:

ok 1 number(s): "883427667"

Test #50:

score: 0
Accepted
time: 53ms
memory: 199164kb

input:

5000 45
1 1 1 -1 1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 1 -1 -1 -1 -1 -1 1 -1 1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 1 -1 -1 -1 -1 -1 -1 -1 1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 1 -1 -1 -1 -1 1 -1 1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 1 -1 ...

output:

435945626

result:

ok 1 number(s): "435945626"

Test #51:

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

input:

5000 64
-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -...

output:

144231886

result:

ok 1 number(s): "144231886"

Test #52:

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

input:

5000 43
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

output:

448366527

result:

ok 1 number(s): "448366527"

Test #53:

score: 0
Accepted
time: 42ms
memory: 198432kb

input:

5000 0
-1 1 -1 -1 1 1 -1 -1 -1 1 -1 -1 1 1 -1 1 -1 1 1 1 -1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 -1 1 1 1 -1 1 -1 1 1 -1 1 1 -1 -1 -1 1 1 1 1 1 1 -1 1 -1 -1 1 1 1 1 1 -1 -1 -1 -1 -1 1 1 1 -1 1 1 -1 -1 1 1 1 1 -1 1 -1 -1 1 1 -1 -1 -1 1 1 1 1 1 -1 -1 -1 -1 -1 1 -1 1 -1 1 1 -1 1 1 -1 -1 -1 -1 -1 1 -1 1 -1 -1 1 ...

output:

961512634

result:

ok 1 number(s): "961512634"

Test #54:

score: 0
Accepted
time: 58ms
memory: 197756kb

input:

5000 0
-1 -1 1 1 -1 -1 1 -1 -1 -1 1 -1 -1 -1 -1 -1 -1 -1 1 -1 1 1 1 -1 -1 1 1 -1 1 -1 -1 -1 1 1 1 -1 -1 1 1 -1 -1 -1 1 1 -1 1 -1 1 1 -1 -1 -1 -1 1 -1 1 1 1 -1 1 -1 -1 1 1 -1 -1 -1 1 -1 1 -1 -1 -1 1 -1 -1 1 -1 -1 -1 1 -1 -1 -1 1 1 -1 -1 1 1 1 1 1 -1 1 -1 -1 -1 1 1 -1 -1 -1 1 1 1 -1 1 -1 -1 1 1 1 -1 1...

output:

356936487

result:

ok 1 number(s): "356936487"

Test #55:

score: 0
Accepted
time: 32ms
memory: 198544kb

input:

5000 0
1 -1 -1 1 -1 -1 1 1 -1 1 1 -1 -1 1 -1 1 -1 -1 1 -1 1 -1 -1 1 -1 1 -1 -1 -1 1 1 1 1 -1 -1 1 1 -1 -1 1 1 1 1 -1 1 1 1 -1 -1 -1 -1 1 1 -1 -1 -1 1 -1 1 1 1 1 1 -1 -1 -1 1 -1 1 -1 -1 -1 -1 1 -1 -1 1 -1 -1 -1 1 -1 1 1 -1 1 -1 -1 -1 1 -1 1 -1 1 -1 1 1 1 -1 -1 -1 1 -1 -1 -1 -1 1 -1 1 -1 -1 1 1 1 1 1 ...

output:

973390554

result:

ok 1 number(s): "973390554"

Test #56:

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

input:

5000 100
-1 1 -1 -1 -1 1 -1 -1 1 1 -1 -1 -1 -1 1 -1 -1 1 1 1 1 1 -1 -1 1 -1 -1 1 -1 -1 1 1 1 -1 1 -1 1 -1 1 1 1 -1 -1 1 1 -1 1 -1 1 -1 1 -1 -1 1 1 -1 1 1 -1 1 1 1 1 1 1 1 -1 -1 -1 -1 1 -1 1 1 -1 1 -1 1 1 -1 1 -1 -1 -1 -1 -1 1 1 1 1 -1 -1 -1 1 -1 -1 1 -1 1 -1 1 1 -1 -1 1 -1 1 1 1 1 -1 1 1 1 -1 -1 -1 ...

output:

906315241

result:

ok 1 number(s): "906315241"

Test #57:

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

input:

5000 100
1 1 1 1 -1 1 1 1 1 1 -1 -1 1 -1 -1 -1 -1 -1 1 -1 1 -1 -1 -1 1 1 -1 -1 1 -1 1 1 -1 -1 -1 1 -1 1 1 1 1 1 1 1 1 1 1 -1 1 -1 1 -1 1 -1 -1 1 1 1 1 -1 -1 1 1 -1 -1 -1 1 1 1 1 1 -1 1 1 1 -1 1 1 1 -1 -1 1 1 1 1 1 -1 1 -1 1 -1 -1 1 -1 1 1 1 -1 -1 1 1 1 -1 -1 1 -1 1 1 1 1 1 1 -1 -1 -1 1 -1 1 1 -1 -1 ...

output:

906315241

result:

ok 1 number(s): "906315241"

Test #58:

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

input:

5000 100
1 1 1 -1 -1 -1 -1 -1 -1 -1 1 -1 -1 1 -1 1 -1 1 1 1 1 -1 -1 1 1 -1 -1 -1 1 1 -1 -1 1 -1 1 -1 -1 1 -1 -1 1 1 -1 -1 -1 1 1 -1 1 -1 -1 -1 -1 1 -1 -1 1 -1 -1 1 -1 1 1 1 1 -1 -1 -1 1 -1 -1 1 -1 1 -1 1 -1 -1 -1 -1 1 1 -1 1 -1 1 -1 1 1 -1 -1 -1 -1 -1 -1 1 -1 1 -1 1 1 1 -1 -1 1 1 -1 1 -1 1 -1 1 1 -1...

output:

906315241

result:

ok 1 number(s): "906315241"

Test #59:

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

input:

5000 100
-1 1 1 -1 1 1 -1 1 -1 -1 1 -1 1 -1 1 1 1 -1 -1 1 -1 1 1 -1 1 -1 -1 1 1 -1 1 1 1 1 1 -1 -1 1 -1 -1 1 -1 -1 1 1 -1 1 -1 1 1 -1 1 1 1 -1 1 -1 -1 1 1 1 -1 -1 1 -1 1 -1 -1 1 1 -1 1 -1 1 -1 1 1 -1 -1 -1 1 1 -1 -1 1 1 -1 -1 -1 -1 -1 1 -1 1 -1 -1 1 1 -1 -1 1 -1 -1 1 -1 -1 -1 1 -1 -1 -1 1 -1 -1 -1 -...

output:

906315241

result:

ok 1 number(s): "906315241"

Test #60:

score: 0
Accepted
time: 75ms
memory: 199332kb

input:

5000 100
1 1 1 1 -1 -1 -1 -1 -1 -1 -1 -1 1 1 -1 -1 -1 -1 1 1 1 -1 1 -1 -1 1 -1 1 -1 1 1 1 -1 -1 -1 -1 1 1 -1 -1 -1 1 1 1 1 1 1 -1 1 -1 -1 1 1 -1 1 -1 1 -1 1 -1 1 1 1 -1 1 -1 -1 -1 1 -1 1 1 -1 -1 -1 -1 1 -1 -1 1 -1 1 1 1 1 -1 -1 -1 1 -1 1 1 1 1 1 -1 -1 -1 -1 -1 1 -1 -1 -1 -1 -1 1 -1 -1 -1 1 1 1 -1 1 ...

output:

906315241

result:

ok 1 number(s): "906315241"

Test #61:

score: 0
Accepted
time: 42ms
memory: 198996kb

input:

4998 5
-1 1 -1 1 -1 1 -1 1 1 1 1 -1 1 -1 -1 1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 1 1 1 1 -1 -1 -1 1 1 -1 -1 -1 -1 1 -1 -1 1 1 -1 1 -1 -1 1 1 1 1 -1 1 1 1 1 1 -1 -1 1 1 -1 -1 -1 1 -1 -1 1 -1 1 1 -1 1 1 1 1 -1 -1 1 -1 -1 1 -1 1 -1 -1 -1 -1 1 1 -1 1 1 1 -1 1 1 -1 1 -1 -1 -1 -1 -1 1 1 1 1 1 1 1 1 -1 1 1 -1 1...

output:

335960136

result:

ok 1 number(s): "335960136"

Test #62:

score: 0
Accepted
time: 48ms
memory: 197716kb

input:

4998 5
1 1 -1 1 1 -1 1 1 -1 -1 1 1 1 -1 1 1 -1 1 1 -1 -1 1 1 1 1 -1 1 -1 -1 1 1 -1 1 1 -1 1 -1 1 1 -1 1 1 -1 -1 1 1 1 -1 -1 1 -1 1 1 -1 1 -1 -1 1 -1 1 -1 1 -1 -1 -1 -1 -1 -1 -1 -1 1 1 -1 1 1 -1 -1 -1 -1 1 1 -1 1 -1 1 -1 1 1 -1 -1 1 -1 1 1 1 -1 -1 -1 1 1 -1 -1 1 -1 1 1 -1 -1 1 -1 -1 1 -1 -1 -1 1 1 1 ...

output:

931188852

result:

ok 1 number(s): "931188852"

Test #63:

score: 0
Accepted
time: 35ms
memory: 198628kb

input:

4998 5
1 -1 1 1 -1 1 1 1 -1 1 1 1 -1 -1 -1 1 1 -1 1 1 -1 -1 1 1 -1 1 1 1 1 1 1 -1 -1 -1 1 1 1 -1 1 -1 -1 1 -1 1 -1 1 1 -1 1 1 -1 -1 -1 -1 -1 1 -1 -1 1 -1 -1 1 1 -1 1 1 1 1 1 1 -1 -1 -1 1 1 1 -1 -1 -1 -1 1 1 1 -1 1 1 -1 -1 1 1 1 -1 -1 -1 -1 1 -1 1 1 1 -1 1 1 1 -1 1 1 -1 1 1 -1 -1 -1 -1 -1 1 1 1 -1 -1...

output:

747827219

result:

ok 1 number(s): "747827219"

Test #64:

score: 0
Accepted
time: 2ms
memory: 3792kb

input:

1 9
-1

output:

176356503

result:

ok 1 number(s): "176356503"

Test #65:

score: 0
Accepted
time: 2ms
memory: 3528kb

input:

2 69
-1 1

output:

857232356

result:

ok 1 number(s): "857232356"

Test #66:

score: 0
Accepted
time: 2ms
memory: 3824kb

input:

3 63
-1 -1 1

output:

296264521

result:

ok 1 number(s): "296264521"