QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#121383#6718. Масив i частковi сумиznstz74 1349ms57812kbC++148.1kb2023-07-08 01:16:362023-07-08 01:16:37

詳細信息

Subtask #1:

score: 14
Accepted

Test #1:

score: 14
Accepted
time: 4ms
memory: 5496kb

input:

200000 1
1 1 0 0 1 0 1 0 0 0 0 1 1 0 1 0 1 1 0 1 1 0 0 1 1 1 0 0 1 1 1 1 0 1 0 1 1 1 1 1 0 1 0 1 0 1 1 0 0 1 1 1 0 0 1 0 0 0 1 0 0 1 0 1 0 0 0 1 0 0 1 0 0 1 1 0 1 0 0 1 0 0 0 0 1 0 0 1 1 1 1 1 0 0 0 1 1 0 1 1 1 1 1 1 0 0 0 1 1 0 0 1 0 1 0 1 0 1 1 0 1 0 1 0 1 1 0 1 0 1 1 1 1 1 1 0 1 1 1 0 1 1 1 0 0 0...

output:

0

result:

ok OK: 0 operations

Test #2:

score: 0
Accepted
time: 10ms
memory: 5604kb

input:

200000 1
-1 0 0 0 -1 0 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 0 0 -1 -1 0 -1 -1 0 0 0 -1 -1 0 -1 0 -1 0 -1 0 -1 -1 0 0 -1 -1 0 0 -1 -1 0 -1 -1 -1 -1 0 -1 -1 0 0 0 -1 0 -1 -1 -1 0 -1 -1 0 0 0 -1 -1 -1 -1 -1 0 0 -1 -1 0 -1 0 -1 0 -1 -1 -1 0 -1 -1 0 0 0 0 -1 -1 -1 0 0 -1 -1 -1 0 0 -1 -1 -1 0 0 -1 -1 -1 0 -...

output:

1
1

result:

ok OK: 1 operations

Test #3:

score: 0
Accepted
time: 10ms
memory: 7572kb

input:

200000 1
0 0 1 -1 1 1 -1 -1 0 1 -1 0 0 1 0 0 1 1 1 1 0 -1 -1 0 -1 -1 1 -1 1 1 1 1 -1 1 -1 1 1 0 -1 -1 0 1 0 0 0 0 1 1 -1 0 0 -1 -1 -1 0 0 0 1 1 1 -1 1 1 0 0 1 1 -1 1 0 0 1 1 1 1 -1 0 1 0 0 0 0 1 0 0 -1 0 -1 1 -1 0 1 -1 -1 0 0 0 -1 0 0 1 1 1 0 -1 0 1 1 1 0 1 0 0 0 -1 -1 0 -1 -1 1 -1 -1 1 1 0 1 1 1 -1...

output:

1
2 1 200000

result:

ok OK: 1 operations

Test #4:

score: 0
Accepted
time: 10ms
memory: 7612kb

input:

200000 1
-1 -1 -1 -1 0 1 0 -1 -1 0 -1 -1 1 0 0 -1 0 1 -1 0 -1 1 -1 0 1 1 0 1 1 1 0 0 1 -1 0 1 0 0 0 0 1 1 1 1 1 0 1 -1 1 1 0 -1 0 1 0 0 0 1 1 0 1 0 -1 -1 0 0 -1 -1 0 1 -1 -1 -1 0 1 0 0 -1 0 1 0 1 1 1 1 0 1 -1 -1 -1 0 0 0 -1 1 1 -1 -1 -1 1 0 0 -1 -1 0 -1 -1 -1 0 1 1 1 1 0 1 -1 -1 0 -1 0 0 0 -1 -1 -1 ...

output:

1
3 1 200000

result:

ok OK: 1 operations

Subtask #2:

score: 17
Accepted

Test #5:

score: 17
Accepted
time: 5ms
memory: 7620kb

input:

200000 2
1 1 0 0 1 0 1 0 1 1 0 1 1 1 1 0 0 0 1 1 0 0 0 1 1 0 1 0 0 0 0 0 1 0 1 0 0 1 0 1 1 1 0 0 1 1 0 0 0 0 0 0 1 1 0 1 1 0 1 0 1 0 1 1 1 0 0 1 0 0 1 1 1 1 0 0 0 0 1 1 0 0 0 1 1 0 1 0 1 1 0 0 0 0 1 1 0 1 1 1 1 0 0 0 0 1 0 0 1 0 0 0 1 1 1 0 0 1 1 0 1 1 0 1 1 1 0 0 1 0 0 0 0 0 1 1 0 0 0 1 1 0 1 0 1 0...

output:

0

result:

ok OK: 0 operations

Test #6:

score: 0
Accepted
time: 10ms
memory: 7612kb

input:

200000 2
0 0 -1 -1 0 -1 0 0 -1 -1 0 -1 -1 0 -1 0 -1 -1 -1 -1 -1 0 0 -1 0 -1 -1 0 0 -1 -1 -1 -1 -1 -1 -1 -1 0 0 -1 -1 0 -1 -1 -1 0 -1 0 -1 0 -1 0 0 0 0 0 0 0 0 0 0 -1 0 -1 0 -1 0 0 0 -1 -1 0 0 -1 -1 -1 0 -1 -1 0 -1 -1 -1 -1 0 -1 -1 -1 0 0 -1 0 0 0 -1 -1 -1 0 0 -1 -1 0 -1 -1 -1 -1 -1 -1 -1 0 0 0 -1 -1...

output:

1
1

result:

ok OK: 1 operations

Test #7:

score: 0
Accepted
time: 1349ms
memory: 51968kb

input:

200000 2
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 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

output:

2
3 10031 52201
2 1 200000

result:

ok OK: 2 operations

Test #8:

score: 0
Accepted
time: 862ms
memory: 57812kb

input:

200000 2
1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -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:

2
2 167935 199999
3 1 200000

result:

ok OK: 2 operations

Test #9:

score: 0
Accepted
time: 1192ms
memory: 56212kb

input:

200000 2
1 1 0 0 1 0 0 0 0 0 0 0 1 0 0 -1 0 0 0 0 -1 0 -1 0 -1 0 0 0 0 -1 0 0 0 -1 0 0 0 -1 0 -1 0 0 0 0 0 0 0 -1 -1 1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 -1 0 -1 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 -1 0 0 0 0 -1 0 0 0 1 0 0 -1 0 -1 0 0 0 0 0 -1 0 0 0 -1 -1 0 0 0 -1 0 -1 0 0 0 0 0 0 ...

output:

3
1
3 1 100001
2 1 200000

result:

ok OK: 3 operations

Test #10:

score: 0
Accepted
time: 434ms
memory: 49336kb

input:

200000 2
-1 0 1 -1 0 1 1 0 1 0 0 1 0 1 -1 1 1 -1 1 -1 -1 0 -1 -1 0 -1 0 0 0 1 1 0 -1 1 -1 0 1 0 1 -1 -1 -1 -1 1 -1 1 1 -1 1 1 -1 0 1 -1 0 -1 1 -1 0 -1 1 -1 0 1 1 1 0 -1 0 -1 -1 -1 -1 0 0 -1 1 -1 -1 0 1 -1 0 0 0 0 0 0 1 1 1 0 -1 0 -1 1 -1 1 -1 1 1 0 0 1 1 -1 1 1 -1 -1 1 0 -1 1 -1 0 0 0 -1 0 0 1 1 -1 ...

output:

2
3 199915 200000
3 1 200000

result:

ok OK: 2 operations

Subtask #3:

score: 0
Time Limit Exceeded

Dependency #2:

100%
Accepted

Test #11:

score: 18
Accepted
time: 9ms
memory: 7540kb

input:

200000 3
0 1 1 0 0 1 0 1 0 0 1 1 1 0 0 1 1 1 0 0 1 1 0 0 1 0 0 0 1 0 0 1 1 0 0 0 1 0 0 0 1 1 0 1 1 1 0 0 0 0 1 1 0 1 1 0 0 0 0 1 1 0 0 1 0 0 1 0 1 1 1 0 0 1 0 0 0 0 1 1 0 1 0 0 1 1 0 1 0 1 0 0 0 0 0 1 1 0 0 1 0 1 0 1 0 0 0 0 1 1 0 0 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 1 1 0 1 1 1 1 1 1 1 1 0 1 0 0 1 0...

output:

0

result:

ok OK: 0 operations

Test #12:

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

input:

200000 3
0 -1 0 -1 -1 -1 0 0 -1 0 -1 -1 0 0 -1 0 0 -1 -1 -1 0 0 -1 -1 -1 0 -1 -1 0 0 -1 0 0 0 -1 -1 0 -1 0 0 0 -1 0 0 0 0 -1 0 0 0 0 0 -1 -1 -1 -1 0 -1 -1 0 0 0 -1 -1 -1 0 -1 -1 0 -1 0 -1 -1 -1 0 -1 0 -1 -1 0 -1 0 0 0 -1 -1 -1 -1 0 0 -1 -1 0 0 0 -1 0 0 -1 -1 0 0 -1 -1 0 0 0 0 0 -1 0 0 0 0 -1 -1 0 -1...

output:

1
1

result:

ok OK: 1 operations

Test #13:

score: 0
Accepted
time: 10ms
memory: 5500kb

input:

200000 3
-1 -1 -1 -1 1 -1 0 1 -1 0 -1 -1 -1 1 1 0 -1 0 1 -1 1 0 -1 0 0 1 -1 0 -1 0 0 -1 1 -1 1 1 -1 -1 0 -1 1 1 0 0 1 0 1 1 1 -1 0 -1 0 1 1 1 -1 -1 -1 1 -1 0 -1 0 1 -1 1 -1 -1 -1 1 0 1 1 -1 0 0 -1 1 -1 1 1 1 1 0 -1 1 -1 0 -1 -1 1 0 0 1 -1 1 -1 0 1 0 0 0 1 0 -1 -1 1 -1 -1 0 1 -1 1 1 0 0 1 0 1 0 1 1 -...

output:

1
3 1 200000

result:

ok OK: 1 operations

Test #14:

score: 0
Accepted
time: 387ms
memory: 49696kb

input:

193638 3
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 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 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 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 0 1 1 1 1 0 0 1...

output:

2
2 1 625
2 1 193638

result:

ok OK: 2 operations

Test #15:

score: 0
Accepted
time: 852ms
memory: 52020kb

input:

200000 3
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 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

output:

2
3 13464 70916
2 1 200000

result:

ok OK: 2 operations

Test #16:

score: 0
Accepted
time: 857ms
memory: 52092kb

input:

200000 3
1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 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 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 0 -1 -1 -1 -1 0 -1 -1 -1 -1 -1 -1...

output:

2
3 2 44502
2 1 200000

result:

ok OK: 2 operations

Test #17:

score: -18
Time Limit Exceeded

input:

200000 3
1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -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:


result:


Subtask #4:

score: 0
Skipped

Dependency #3:

0%

Subtask #5:

score: 7
Accepted

Test #28:

score: 7
Accepted
time: 5ms
memory: 36376kb

input:

2891 5
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 -1 -1 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 0 -1 -1 -1 -1 -1 -1 -1 ...

output:

2
2 1 75
2 1 2891

result:

ok OK: 2 operations

Test #29:

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

input:

2847 5
1 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 0 1 0 1 1 1 1 0 1 1 1 1 1 1 1 1 0 1 0 1 1 1 1 1 1 1 1 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 0 -1 0 -1 -1 -1 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 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ...

output:

2
2 1 80
2 1 2847

result:

ok OK: 2 operations

Test #30:

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

input:

2981 5
1 1 1 1 0 0 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 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 0 -1 -1 -1 0 -1 -1 -1 -1 -1 -1 -1 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ...

output:

2
2 1 80
2 1 2981

result:

ok OK: 2 operations

Test #31:

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

input:

3000 5
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 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

output:

2
2 1 1456
2 1 3000

result:

ok OK: 2 operations

Test #32:

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

input:

3000 5
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 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

output:

2
2 1 1463
2 1 3000

result:

ok OK: 2 operations

Subtask #6:

score: 19
Accepted

Dependency #5:

100%
Accepted

Test #33:

score: 19
Accepted
time: 391ms
memory: 49056kb

input:

191855 6
1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 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 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 1...

output:

2
2 1 626
2 1 191855

result:

ok OK: 2 operations

Test #34:

score: 0
Accepted
time: 387ms
memory: 48992kb

input:

191982 6
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 1 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 0 1 1...

output:

2
2 1 623
2 1 191982

result:

ok OK: 2 operations

Test #35:

score: 0
Accepted
time: 393ms
memory: 48996kb

input:

193538 6
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 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 0 1 0 1 1 1 1 1 0 1 1 1 1 1 1 0...

output:

2
2 1 631
2 1 193538

result:

ok OK: 2 operations

Test #36:

score: 0
Accepted
time: 449ms
memory: 49636kb

input:

200000 6
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 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

output:

2
2 1 96885
2 1 200000

result:

ok OK: 2 operations

Test #37:

score: 0
Accepted
time: 446ms
memory: 49620kb

input:

200000 6
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 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

output:

2
2 1 96894
2 1 200000

result:

ok OK: 2 operations

Subtask #7:

score: 17
Accepted

Dependency #5:

100%
Accepted

Test #38:

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

input:

3000 7
1 0 1 0 1 1 0 0 0 0 0 1 0 1 1 1 1 0 1 1 0 1 0 0 0 1 1 1 0 0 1 0 0 1 1 1 0 0 0 1 0 1 1 1 1 1 0 1 0 0 0 1 0 0 0 0 0 1 1 0 0 1 0 0 1 1 0 1 0 1 0 1 1 0 1 0 0 0 1 1 1 1 1 1 1 1 0 0 1 0 1 0 0 1 1 1 0 1 0 0 1 1 0 1 0 0 0 1 1 1 1 1 0 1 0 1 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 1 1 1 0 1 1 1 0 0 1 1 0 0 1 1 0...

output:

0

result:

ok OK: 0 operations

Test #39:

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

input:

3000 7
-1 0 0 1 1 0 0 0 -1 1 0 0 1 0 -1 0 0 1 -1 -1 -1 1 1 -1 1 1 0 -1 0 -1 -1 0 0 -1 -1 -1 0 0 1 1 -1 1 -1 -1 0 1 -1 -1 0 1 -1 -1 0 1 1 -1 1 1 1 -1 0 1 -1 0 -1 0 1 0 1 1 -1 1 -1 1 0 0 1 -1 0 1 1 0 -1 1 1 -1 1 0 1 0 0 -1 0 -1 0 1 1 -1 1 1 -1 1 -1 -1 -1 1 -1 -1 0 1 -1 -1 1 -1 -1 -1 -1 0 1 0 1 -1 0 -1...

output:

2
3 2950 3000
3 1 3000

result:

ok OK: 2 operations

Test #40:

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

input:

3000 7
-1 0 0 0 0 -1 0 -1 -1 0 0 0 0 0 -1 -1 0 -1 -1 0 0 0 0 -1 -1 0 -1 0 -1 -1 -1 0 -1 -1 -1 -1 -1 0 0 -1 -1 -1 0 0 0 0 -1 0 -1 0 -1 0 -1 0 -1 0 0 -1 0 -1 0 0 0 -1 -1 0 0 -1 -1 0 0 -1 -1 0 0 -1 0 -1 0 -1 -1 -1 0 -1 -1 -1 0 0 -1 0 -1 0 -1 0 0 0 0 -1 0 -1 0 -1 -1 -1 -1 0 0 0 0 0 -1 0 0 -1 -1 -1 -1 0 ...

output:

1
1

result:

ok OK: 1 operations

Test #41:

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

input:

3000 7
-1 0 0 1 -1 1 -1 0 -1 1 -1 0 -1 1 1 1 0 1 -1 1 1 0 1 -1 -1 0 -1 1 0 0 -1 0 0 1 1 1 0 1 1 0 1 0 -1 0 0 -1 -1 1 1 0 0 1 1 1 -1 1 1 -1 -1 -1 -1 1 -1 -1 0 -1 0 -1 0 0 1 0 1 1 1 -1 1 0 0 0 -1 -1 0 0 1 0 1 -1 1 -1 0 1 -1 -1 0 -1 -1 0 1 0 0 -1 -1 0 -1 0 1 -1 1 -1 1 1 0 -1 1 0 0 -1 0 1 1 0 -1 1 1 1 0...

output:

1
3 1 3000

result:

ok OK: 1 operations

Test #42:

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

input:

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

output:

2
3 131 622
2 1 3000

result:

ok OK: 2 operations

Test #43:

score: 0
Accepted
time: 14ms
memory: 42520kb

input:

3000 7
1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -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:

2
2 2441 2830
3 1 3000

result:

ok OK: 2 operations

Test #44:

score: 0
Accepted
time: 13ms
memory: 40452kb

input:

3000 7
1 1 1 1 1 0 -1 -1 0 -1 -1 -1 0 0 0 -1 0 0 1 0 0 0 0 0 0 0 0 1 -1 -1 -1 0 0 0 -1 0 -1 -1 0 1 0 -1 0 0 0 0 0 0 -1 0 0 0 -1 -1 0 -1 0 -1 0 0 0 0 0 0 -1 0 0 0 -1 0 0 0 0 -1 0 0 -1 0 0 0 -1 0 -1 0 0 0 0 -1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 -1 0 -1 0 0 -1 0 0 -1 -1 0 -1 -1 0 0 0 0 0 0 -1 -1 0 0 0 0 0 0 ...

output:

3
1
3 1 1501
2 1 3000

result:

ok OK: 3 operations

Test #45:

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

input:

3000 7
1 1 1 -1 1 0 -1 0 0 -1 0 -1 0 0 0 0 -1 0 -1 0 0 -1 -1 -1 0 0 0 0 0 -1 0 -1 0 0 0 1 0 -1 0 0 0 0 0 -1 0 -1 0 0 -1 0 -1 0 0 -1 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 -1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 -1 0 1 0 0 0 0 -1 0 -1 0 0 0 0 0 0 0 -1 0 0 0 -1 -1 0 0 0 -1 0 -1 -1 0 0 0 0 0 0 -1 -1 -1 0 0 0 -1 0 ...

output:

3
1
3 1 1501
2 1 3000

result:

ok OK: 3 operations

Test #46:

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

input:

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

output:

2
3 2885 2959
3 1 2959

result:

ok OK: 2 operations

Test #47:

score: 0
Accepted
time: 7ms
memory: 40420kb

input:

3000 7
0 1 1 -1 -1 1 0 -1 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 1 -1 1 -1 1 0 0 1 0 1 1 -1 1 -1 1 0 1 1 1 1 1 0 0 0 1 1 1 -1 -1 0 0 0 0 0 -1 -1 -1 -1 0 -1 1 0 -1 1 0 0 0 -1 1 -1 -1 0 1 0 1 -1 1 -1 1 1 -1 0 1 -1 0 0 1 0 -1 0 0 -1 -1 -1 0 0 1 -1 0 0 -1 1 -1 -1 -1 0 -1 0 -1 -1 0 -1 1 1 1 -1 1 0 -1 0 1 1 -1 1 0 ...

output:

2
3 1 59
2 1 3000

result:

ok OK: 2 operations

Subtask #8:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

0%