QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#131730#5231. Ornitolog 2 [B]SuffixTree10 ✓5ms4076kbC++17599b2023-07-27 22:26:152023-07-27 22:26:18

詳細信息

Subtask #1:

score: 1
Accepted

Test #1:

score: 1
Accepted
time: 1ms
memory: 3660kb

input:

20
2 2 2 1 2 2 1 1 1 2 1 1 1 2 1 2 2 2 2 2

output:

7

result:

ok single line: '7'

Test #2:

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

input:

19
-1 -1 -1 -2 -2 -1 -1 -1 -2 -2 -2 -1 -1 -1 -2 -1 -2 -1 -1

output:

6

result:

ok single line: '6'

Test #3:

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

input:

20
-37 -33 -28 -22 -18 -14 -7 -4 3 8 12 18 21 28 33 38 41 46 52 57

output:

9

result:

ok single line: '9'

Test #4:

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

input:

19
1 0 1 2 -1 0 0 -1 -2 0 0 -1 -2 1 -1 -2 -2 -1 -1

output:

5

result:

ok single line: '5'

Test #5:

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

input:

3
0 0 0

output:

1

result:

ok single line: '1'

Test #6:

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

input:

20
-50 50 -50 50 -50 50 -50 50 -50 50 -50 50 -50 50 -50 50 -50 50 -50 50

output:

0

result:

ok single line: '0'

Test #7:

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

input:

19
50 -50 50 -50 50 -50 50 -50 50 -50 50 -50 50 -50 50 -50 50 -50 50

output:

0

result:

ok single line: '0'

Test #8:

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

input:

20
-50 50 -50 50 -50 50 -50 50 -50 50 -50 50 -50 50 -50 50 -50 50 -50 -50

output:

1

result:

ok single line: '1'

Test #9:

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

input:

19
-50 50 -50 50 -50 50 -50 50 -50 50 -50 50 -50 50 -50 50 -50 50 50

output:

1

result:

ok single line: '1'

Test #10:

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

input:

3
1 1 0

output:

1

result:

ok single line: '1'

Subtask #2:

score: 1
Accepted

Test #11:

score: 1
Accepted
time: 1ms
memory: 3724kb

input:

500
-3 2 -3 -2 -2 -6 -1 -1 1 4 -4 0 -5 2 -5 -3 -3 0 3 -2 -1 -1 3 2 6 -1 -2 3 1 -1 -5 -6 2 5 -3 -6 -4 -5 -5 2 2 6 2 -4 4 -5 4 -5 2 -5 1 -1 3 5 1 -1 -2 5 -6 -2 -1 6 2 -3 -6 0 4 -5 -1 -6 2 -4 -2 2 4 -1 5 -2 -3 0 -1 -3 3 6 6 4 2 4 -2 -3 -6 -6 1 -1 -2 -2 2 4 -3 1 -4 -6 4 6 5 -4 -2 -6 -1 -3 -6 2 5 -5 2 -1...

output:

151

result:

ok single line: '151'

Test #12:

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

input:

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

250

result:

ok single line: '250'

Test #13:

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

input:

500
-3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 ...

output:

1

result:

ok single line: '1'

Test #14:

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

input:

500
-50 60 -50 60 -50 60 -50 60 -50 60 -50 60 -50 60 -50 60 -50 60 -50 60 -50 60 -50 60 -50 60 -50 60 -50 60 -50 60 -50 60 -50 60 -50 60 -50 60 -50 60 -50 60 -50 60 -50 60 -50 60 -50 60 -50 60 -50 60 -50 60 -50 60 -50 60 -50 60 -50 60 -50 60 -50 60 -50 60 -50 60 -50 60 -50 60 -50 60 -50 60 -50 60 -5...

output:

1

result:

ok single line: '1'

Test #15:

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

input:

500
3 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2...

output:

1

result:

ok single line: '1'

Test #16:

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

input:

500
3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3...

output:

1

result:

ok single line: '1'

Test #17:

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

input:

500
11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11...

output:

0

result:

ok single line: '0'

Test #18:

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

input:

500
-1 2 2 -1 0 -2 2 -1 -1 -2 -2 -1 1 1 2 -2 -1 0 0 1 -2 -1 1 -2 -1 2 -2 2 -1 -2 -1 -1 1 -1 2 1 1 0 1 2 2 2 -2 1 0 2 0 2 2 1 -1 0 -1 -1 1 -2 2 -2 0 1 2 2 1 2 0 1 2 0 1 2 0 1 2 1 -1 0 0 2 -1 1 -1 -2 1 -1 2 2 0 -1 1 0 0 1 -2 1 2 -2 0 1 -1 0 -2 1 2 -2 0 -2 -2 -1 2 1 2 0 0 -2 1 2 1 2 -1 2 0 -1 0 1 0 2 1...

output:

160

result:

ok single line: '160'

Test #19:

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

input:

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

210

result:

ok single line: '210'

Subtask #3:

score: 1
Accepted

Test #20:

score: 1
Accepted
time: 1ms
memory: 3644kb

input:

500
-6 -6 -6 -5 -6 -5 -5 -6 -6 -5 -5 -6 -5 -5 -5 -6 -6 -6 -6 -6 -6 -6 -6 -5 -6 -6 -5 -6 -6 -6 -6 -5 -5 -6 -5 -6 -5 -5 -5 -6 -6 -5 -5 -5 -6 -6 -6 -5 -6 -6 -5 -5 -6 -5 -5 -6 -5 -5 -6 -5 -6 -5 -5 -6 -5 -6 -5 -5 -5 -5 -6 -6 -5 -6 -5 -6 -5 -5 -5 -6 -5 -5 -5 -6 -5 -5 -5 -5 -6 -6 -6 -6 -5 -5 -5 -5 -6 -6 -5...

output:

197

result:

ok single line: '197'

Test #21:

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

input:

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

249

result:

ok single line: '249'

Test #22:

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

input:

499
-3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 ...

output:

1

result:

ok single line: '1'

Test #23:

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

input:

500
3177 2163 1679 4449 -3796 5404 -4320 -4399 -3065 4241 2286 -2577 696 -4537 1943 3365 -4853 1339 5267 3904 -1546 5335 -2664 -4087 135 -3666 5691 2553 1449 1487 -4306 -2561 -3507 -765 2374 -19 2236 -1667 -123 2778 -2940 5898 5101 -3871 -3133 -2743 -2578 1864 5846 -1584 2910 -4124 -3514 2103 -2066 ...

output:

142

result:

ok single line: '142'

Test #24:

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

input:

500
300 300 -200 300 -200 300 -200 300 -200 300 -200 300 -200 300 -200 300 -200 300 -200 300 -200 300 -200 300 -200 300 -200 300 -200 300 -200 300 -200 300 -200 300 -200 300 -200 300 -200 300 -200 300 -200 300 -200 300 -200 300 -200 300 -200 300 -200 300 -200 300 -200 300 -200 300 -200 300 -200 300 ...

output:

1

result:

ok single line: '1'

Test #25:

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

input:

499
30000 -3000 30000 -3000 30000 -3000 30000 -3000 30000 -3000 30000 -3000 30000 -3000 30000 -3000 30000 -3000 30000 -3000 30000 -3000 30000 -3000 30000 -3000 30000 -3000 30000 -3000 30000 -3000 30000 -3000 30000 -3000 30000 -3000 30000 -3000 30000 -3000 30000 -3000 30000 -3000 30000 -3000 30000 -3...

output:

1

result:

ok single line: '1'

Test #26:

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

input:

500
10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10...

output:

0

result:

ok single line: '0'

Test #27:

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

input:

500
-1 -1 1 -2 1 1 -2 2 -2 0 0 2 2 -2 -2 1 -1 2 -1 2 0 1 0 1 -1 1 0 -2 0 2 -2 -2 -1 0 -2 -1 -2 0 0 0 2 2 -1 2 0 0 -2 -2 -2 -2 1 1 2 0 0 1 1 1 1 -2 2 -1 0 0 0 -2 1 -1 2 1 0 2 1 0 1 -1 -1 -1 2 -2 0 -1 -2 0 -1 1 2 2 2 0 -1 1 1 -2 -2 2 1 2 -2 0 -2 1 -1 -1 2 -2 1 1 -1 0 0 0 1 -2 -1 -2 -1 0 -1 2 -2 0 -1 0...

output:

167

result:

ok single line: '167'

Test #28:

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

input:

499
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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:

249

result:

ok single line: '249'

Subtask #4:

score: 1
Accepted

Test #29:

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

input:

2000
4565 4143 1500 -819 3884 -846 -5567 -2653 4286 3043 -4367 4885 1383 -933 5160 5247 -4872 12 -1296 2365 1049 3490 -5324 -5371 -2265 1949 -2948 3953 -388 -5024 -3611 -5253 2666 296 5648 2820 -4418 -1031 -1560 5088 -4679 -3727 -3905 -5372 -4364 -10 -3927 -724 -2787 4213 -1507 2341 -4898 -4416 -546...

output:

571

result:

ok single line: '571'

Test #30:

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

input:

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

999

result:

ok single line: '999'

Test #31:

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

input:

2000
-3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3...

output:

1

result:

ok single line: '1'

Test #32:

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

input:

1999
-5000 6000 -5000 6000 -5000 6000 -5000 6000 -5000 6000 -5000 6000 -5000 6000 -5000 6000 -5000 6000 -5000 6000 -5000 6000 -5000 6000 -5000 6000 -5000 6000 -5000 6000 -5000 6000 -5000 6000 -5000 6000 -5000 6000 -5000 6000 -5000 6000 -5000 6000 -5000 6000 -5000 6000 -5000 6000 -5000 6000 -5000 600...

output:

1

result:

ok single line: '1'

Test #33:

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

input:

2000
-10 -126 67 -12 -39 -87 160 258 -135 32 -149 -157 38 216 -87 55 233 -93 -159 -190 52 11 261 -131 21 -6 -91 245 154 195 229 -113 193 -151 66 -9 120 -161 -109 16 191 86 22 10 -35 -16 -186 -14 79 -175 262 47 271 62 183 258 51 238 182 -129 159 137 -175 243 229 -92 -130 -193 -71 107 -86 14 -121 -44 ...

output:

578

result:

ok single line: '578'

Test #34:

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

input:

1999
30000 -3000 30000 -3000 30000 -3000 30000 -3000 30000 -3000 30000 -3000 30000 -3000 30000 -3000 30000 -3000 30000 -3000 30000 -3000 30000 -3000 30000 -3000 30000 -3000 30000 -3000 30000 -3000 30000 -3000 30000 -3000 30000 -3000 30000 -3000 30000 -3000 30000 -3000 30000 -3000 30000 -3000 30000 -...

output:

1

result:

ok single line: '1'

Test #35:

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

input:

2000
11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 1...

output:

0

result:

ok single line: '0'

Test #36:

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

input:

2000
-110 -111 -110 -110 -110 -111 -110 -110 -110 -111 -110 -110 -111 -110 -111 -110 -111 -110 -110 -111 -110 -110 -111 -110 -111 -110 -110 -110 -111 -110 -110 -111 -111 -110 -111 -111 -111 -111 -110 -110 -111 -110 -111 -110 -111 -111 -111 -110 -110 -110 -110 -111 -110 -110 -111 -111 -110 -110 -110 ...

output:

800

result:

ok single line: '800'

Test #37:

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

input:

1999
168 -29 132 -171 -47 88 -196 28 42 -33 -7 -45 52 37 -79 -43 -36 122 74 101 101 -148 157 81 -65 -194 -141 -2 63 -33 148 -2 -17 35 -20 -45 -156 -31 198 -31 44 3 31 28 -144 162 179 -130 -143 71 141 -66 101 52 -70 -113 -78 57 15 -27 -175 -164 143 68 120 112 -3 153 -186 41 -30 -62 -194 128 198 -102 ...

output:

583

result:

ok single line: '583'

Subtask #5:

score: 1
Accepted

Test #38:

score: 1
Accepted
time: 1ms
memory: 3844kb

input:

3000
519219 -179386 -273050 -396681 -18942 832454 -135197 706783 -869319 408539 -970799 -704277 -38452 994298 -236220 786731 567830 -414433 134985 696866 -928112 -348782 997130 -241843 -583973 -361234 -908908 603351 858664 -991707 -265293 -988161 -189352 -777025 406936 990433 -71411 210225 -580101 -...

output:

850

result:

ok single line: '850'

Test #39:

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

input:

2999
1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000...

output:

1499

result:

ok single line: '1499'

Test #40:

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

input:

3000
-3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3...

output:

1

result:

ok single line: '1'

Test #41:

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

input:

2999
-1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -10000...

output:

1

result:

ok single line: '1'

Test #42:

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

input:

3000
3 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -...

output:

1

result:

ok single line: '1'

Test #43:

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

input:

3000
10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 1...

output:

0

result:

ok single line: '0'

Test #44:

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

input:

2999
-999999 -999999 -999998 -999999 -999999 -999998 -999999 -1000000 -999999 -1000000 -999999 -1000000 -999998 -1000000 -999999 -1000000 -1000000 -999998 -1000000 -1000000 -1000000 -1000000 -999999 -999999 -999999 -999999 -1000000 -999999 -999998 -999998 -999998 -999998 -1000000 -999999 -999998 -10...

output:

1072

result:

ok single line: '1072'

Subtask #6:

score: 1
Accepted

Test #45:

score: 1
Accepted
time: 1ms
memory: 3912kb

input:

10000
581464 653560 352911 -789930 77303 220908 -845678 -185809 -957362 48005 246696 94608 791322 -229153 310556 951473 622185 649633 -635544 124373 -758175 799279 -743140 -820933 -980938 607041 790880 74652 -501907 483915 -938590 -86903 -245377 -846833 -357655 -960718 -498156 249439 -964198 -637679...

output:

2915

result:

ok single line: '2915'

Test #46:

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

input:

10000
-1000000 -1000000 -1000000 -1000000 -1000000 -1000000 -1000000 -1000000 -1000000 -1000000 -1000000 -1000000 -1000000 -1000000 -1000000 -1000000 -1000000 -1000000 -1000000 -1000000 -1000000 -1000000 -1000000 -1000000 -1000000 -1000000 -1000000 -1000000 -1000000 -1000000 -1000000 -1000000 -10000...

output:

5000

result:

ok single line: '5000'

Test #47:

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

input:

9999
1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000...

output:

4999

result:

ok single line: '4999'

Test #48:

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

input:

9999
-1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -10000...

output:

1

result:

ok single line: '1'

Test #49:

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

input:

10000
2 0 2 0 1 3 1 2 1 -2 0 0 -1 -2 -1 -1 0 0 -2 -2 2 3 0 2 0 -1 2 3 0 0 0 -1 1 1 -2 2 -2 2 0 3 -2 2 -2 0 0 -1 0 -1 1 2 -1 2 -1 -2 1 3 -2 3 -1 1 -2 2 -1 -2 3 -1 2 -2 1 3 -2 1 1 -2 0 1 2 -1 -1 3 0 2 -1 1 -2 0 0 3 -1 -2 -2 0 2 2 3 -1 -2 -1 2 3 -1 -2 0 -1 -2 -2 1 -1 0 2 2 0 -1 1 -1 2 1 3 3 -1 2 0 2 -1...

output:

3293

result:

ok single line: '3293'

Test #50:

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

input:

9999
3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 ...

output:

1

result:

ok single line: '1'

Test #51:

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

input:

10000
11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 ...

output:

0

result:

ok single line: '0'

Test #52:

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

input:

10000
0 1 -2 -1 0 -1 0 1 1 -1 1 0 2 1 -1 -1 -1 -2 0 -2 -2 2 0 0 -1 1 -1 -2 1 -2 -1 0 -1 1 -1 0 -1 -1 -2 0 -2 -1 -2 2 -1 1 2 0 -2 -2 -1 0 -1 -1 -1 2 1 -1 -1 -2 0 0 2 2 0 2 1 0 2 -2 2 -2 0 2 -2 0 -2 0 2 -1 0 -1 -2 1 -2 2 -2 2 1 -1 -1 -1 1 -2 1 0 2 2 0 0 0 2 0 1 0 0 -1 0 0 2 2 2 2 -1 1 1 -2 1 -2 -1 -1 ...

output:

3341

result:

ok single line: '3341'

Subtask #7:

score: 1
Accepted

Test #53:

score: 1
Accepted
time: 5ms
memory: 4072kb

input:

49999
578173 969079 978872 -600218 -343879 -325102 -73585 -113252 437169 139362 -601346 893493 138522 481861 -173353 664324 93579 -286302 10965 -513656 446614 982191 -31518 -365171 687634 -424685 490667 63380 -445440 -40464 -511499 366631 -235866 -464750 -91561 636242 557675 -228772 717242 -397425 -...

output:

14645

result:

ok single line: '14645'

Test #54:

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

input:

50000
-999999 -1000000 -1000000 -999999 -1000000 -1000000 -999998 -999998 -999999 -999998 -1000000 -999999 -1000000 -1000000 -999999 -1000000 -999998 -1000000 -999998 -999998 -999999 -999999 -999998 -999999 -1000000 -999998 -1000000 -999998 -999999 -999998 -999999 -999998 -1000000 -1000000 -999998 -...

output:

18263

result:

ok single line: '18263'

Test #55:

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

input:

50000
-3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -...

output:

1

result:

ok single line: '1'

Test #56:

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

input:

49999
1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -10000...

output:

1

result:

ok single line: '1'

Test #57:

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

input:

50000
12253 24102 25882 10579 6583 23623 19354 13791 14298 15468 3619 21171 14048 21840 11949 316 19224 20162 3376 15312 920 23544 23543 29679 8839 12192 20023 10388 12937 22445 5424 4157 6815 17180 3191 7251 23131 17772 2526 11735 4993 10294 9851 18872 10511 10023 18746 28318 11885 18329 12948 1259...

output:

14676

result:

ok single line: '14676'

Test #58:

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

input:

49999
3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3...

output:

1

result:

ok single line: '1'

Test #59:

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

input:

40000
11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 ...

output:

0

result:

ok single line: '0'

Test #60:

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

input:

49999
-1 1 1 -2 0 0 -2 0 -2 0 2 1 1 -2 -1 -1 2 1 -1 2 1 1 1 1 -2 -2 0 -2 -2 1 0 -1 -2 0 2 1 -2 -2 0 -1 0 0 2 1 2 0 -2 1 2 -2 2 -1 -1 2 -2 -2 1 -2 -2 -1 2 -2 -1 2 2 -1 2 0 2 2 -2 1 -2 1 -2 0 -1 2 1 -2 -2 0 -1 2 2 -1 1 2 -2 -2 -1 0 0 1 -1 -2 0 0 -2 2 -2 2 0 -1 1 1 1 2 1 1 2 0 1 -1 0 -2 0 1 2 0 -2 0 -2...

output:

16880

result:

ok single line: '16880'

Subtask #8:

score: 1
Accepted

Test #61:

score: 1
Accepted
time: 4ms
memory: 3780kb

input:

30000
57457 -715403 -912595 -927931 717515 545928 -849602 928621 -168301 -221172 -931963 -242087 3147 -807126 307887 -205786 665361 -704812 209752 913852 99124 -900434 -802472 156127 290669 543590 707881 52108 -323437 -47416 815205 302740 673258 948018 -856152 -284224 648357 -189558 398681 -740132 -...

output:

8776

result:

ok single line: '8776'

Test #62:

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

input:

29999
999992 999990 999994 999997 999999 999990 999996 999990 999997 1000000 999998 999995 999992 999992 999997 999994 1000000 999995 999991 999992 999994 999990 999994 999996 999992 999993 999999 999998 999997 999994 999990 999992 999997 999997 999997 1000000 999999 999992 999995 999990 999992 9999...

output:

9430

result:

ok single line: '9430'

Test #63:

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

input:

30000
-1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000...

output:

1

result:

ok single line: '1'

Test #64:

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

input:

29999
3 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 ...

output:

1

result:

ok single line: '1'

Test #65:

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

input:

30000
-999957 -999962 -999955 -999962 -999954 -999937 -999962 -999997 -999909 -999944 -999972 -999904 -999979 -999918 -999972 -999948 -999946 -999905 -999948 -999916 -999921 -999997 -999978 -999922 -999939 -999948 -999985 -999971 -1000000 -999922 -999983 -999996 -999957 -999989 -999933 -999935 -9999...

output:

8870

result:

ok single line: '8870'

Test #66:

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

input:

29999
10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 ...

output:

0

result:

ok single line: '0'

Test #67:

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

input:

30000
-999998 -1000000 -999999 -999998 -999999 -1000000 -999999 -1000000 -999999 -999999 -1000000 -999998 -1000000 -999999 -1000000 -1000000 -999998 -999998 -999999 -999998 -999998 -999998 -999998 -1000000 -999998 -999999 -999998 -999999 -1000000 -999999 -999999 -999998 -999999 -1000000 -999998 -999...

output:

10925

result:

ok single line: '10925'

Subtask #9:

score: 1
Accepted

Test #68:

score: 1
Accepted
time: 5ms
memory: 3848kb

input:

50000
1000000 999998 1000000 999995 1000000 999997 999995 999996 1000000 999999 999996 999996 999995 999996 1000000 999999 999997 999995 999998 999999 999997 999997 999999 999995 999995 999997 999997 999998 999998 999996 999995 999997 999997 1000000 999996 999995 1000000 999995 999996 1000000 999999...

output:

16504

result:

ok single line: '16504'

Test #69:

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

input:

49999
-1000000 -1000000 -999998 -999999 -1000000 -999998 -1000000 -999998 -999998 -999999 -999998 -999998 -999999 -1000000 -1000000 -999998 -999998 -1000000 -999998 -999999 -1000000 -999999 -1000000 -999998 -999999 -1000000 -1000000 -999998 -999998 -1000000 -999998 -999998 -999998 -1000000 -1000000 ...

output:

18269

result:

ok single line: '18269'

Test #70:

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

input:

50000
-1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000000 1000000 -1000...

output:

1

result:

ok single line: '1'

Test #71:

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

input:

49999
3 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 ...

output:

1

result:

ok single line: '1'

Test #72:

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

input:

50000
-3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3...

output:

1

result:

ok single line: '1'

Test #73:

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

input:

49999
11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 ...

output:

0

result:

ok single line: '0'

Test #74:

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

input:

49999
10 11 10 11 10 11 10 10 10 10 10 10 10 11 11 10 11 11 11 10 10 10 10 11 10 10 10 11 10 10 10 10 10 10 11 11 11 11 11 10 11 10 11 11 10 10 10 10 11 10 10 10 10 11 10 11 11 11 10 10 10 11 10 10 11 10 10 11 10 10 10 11 10 11 11 11 10 11 10 10 11 11 10 10 10 11 10 10 11 10 10 11 10 10 11 11 10 10 ...

output:

19887

result:

ok single line: '19887'

Test #75:

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

input:

49999
999999 999998 999998 1000000 999998 1000000 999999 1000000 1000000 999998 1000000 999999 999999 999998 999999 999998 999998 999999 999999 999999 999999 1000000 999999 1000000 999998 999998 1000000 1000000 1000000 999999 999998 999999 999999 1000000 999998 1000000 999999 999998 999998 1000000 9...

output:

18252

result:

ok single line: '18252'

Test #76:

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

input:

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

21604

result:

ok single line: '21604'

Subtask #10:

score: 1
Accepted

Test #77:

score: 1
Accepted
time: 5ms
memory: 3892kb

input:

50000
633738 484967 556278 678406 140951 -982226 31265 741022 270426 681719 -952716 -100147 -928779 -564956 -396036 -401879 640319 981961 187722 758661 999394 -85315 776373 430375 79786 -314974 358538 521301 -442701 214222 -310614 63724 -537917 608889 -446058 -961010 751750 -777005 97473 -975957 -24...

output:

14560

result:

ok single line: '14560'

Test #78:

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

input:

49999
1000000 999994 999996 999999 999996 999995 999993 1000000 999991 1000000 999999 999999 999996 999998 999998 999996 999994 999994 999997 999996 999995 999991 999998 999994 999992 999996 999999 999999 1000000 999997 999996 999995 999997 999994 999993 999996 999997 999992 999990 999995 999995 999...

output:

15560

result:

ok single line: '15560'

Test #79:

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

input:

42000
999990 999999 999995 999998 999997 999996 999995 999995 999991 999991 999996 999993 999998 1000000 999999 999993 999991 999997 999994 999991 999993 999990 999998 999997 999996 999996 999996 999999 999990 999995 999995 999996 999991 999993 999997 999995 1000000 999990 999994 999992 999998 99999...

output:

13081

result:

ok single line: '13081'

Test #80:

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

input:

49999
3 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 -2 3 ...

output:

1

result:

ok single line: '1'

Test #81:

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

input:

50000
3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3 3 -3...

output:

1

result:

ok single line: '1'

Test #82:

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

input:

49999
10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 10 11 ...

output:

0

result:

ok single line: '0'

Test #83:

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

input:

49999
-999976 -999994 -999992 -1000000 -999970 -999986 -999980 -999995 -999992 -999995 -999985 -999980 -1000000 -999989 -999998 -999987 -999985 -999984 -999990 -999991 -999994 -999982 -999998 -1000000 -999990 -999998 -999997 -999977 -999978 -999985 -999994 -999990 -999972 -999989 -999977 -999979 -99...

output:

14886

result:

ok single line: '14886'

Test #84:

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

input:

50000
-999999 -1000000 -1000000 -1000000 -1000000 -999999 -999999 -1000000 -1000000 -1000000 -999999 -1000000 -999999 -999999 -1000000 -999999 -1000000 -999999 -1000000 -999999 -1000000 -999999 -999999 -1000000 -999999 -999999 -1000000 -999999 -1000000 -1000000 -999999 -999999 -999999 -999999 -10000...

output:

19993

result:

ok single line: '19993'

Test #85:

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

input:

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

21606

result:

ok single line: '21606'

Extra Test:

score: 0
Extra Test Passed