QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#670451#8414. Autostrada 2 [A]LeafSeek7 2893ms76208kbC++173.9kb2024-10-23 21:47:252024-10-23 21:47:25

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 1
Accepted

Test #1:

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

input:

2 2 0
-7 -1
-12 2

output:

2

result:

ok Answer correct.

Test #2:

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

input:

2 7 0
-8 -9 -8 2 -6 -3 -10
2 -14 -8 11 0 -12 -14

output:

2

result:

ok Answer correct.

Test #3:

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

input:

7 2 0
2 -7
-4 14
9 0
-9 0
10 -2
-9 2
-1 -7

output:

2

result:

ok Answer correct.

Test #4:

score: 1
Accepted
time: 2ms
memory: 12852kb

input:

7 7 0
5 5 14 3 1 10 3
9 14 13 -1 9 -6 3
-8 15 3 -15 0 -4 -3
14 11 12 11 -7 -6 -8
1 -10 -15 0 -14 -4 13
2 -1 0 6 -10 -2 14
-5 -13 -7 -8 0 3 4

output:

4

result:

ok Answer correct.

Test #5:

score: 1
Accepted
time: 2ms
memory: 11248kb

input:

7 7 0
-8 -9 -14 -11 -4 -13 -10
-12 -8 -2 -9 0 -10 -5
-10 -8 -11 0 -3 -4 -1
-5 -6 -3 5 3 1 -6
-4 -11 -8 6 0 4 -3
-7 -2 -7 -6 -7 2 -11
-5 -12 -12 -9 -11 -13 -5

output:

4

result:

ok Answer correct.

Test #6:

score: 1
Accepted
time: 2ms
memory: 11164kb

input:

7 7 0
-6 3 -6 -11 -5 6 3
3 3 -6 -10 -4 9 -11
6 3 -6 -10 0 8 12
14 2 -6 -5 -1 7 3
0 0 -2 -6 -1 6 -15
9 1 -3 -7 -2 6 4
-13 1 -4 -8 -2 6 -14

output:

6

result:

ok Answer correct.

Test #7:

score: 1
Accepted
time: 2ms
memory: 13016kb

input:

7 7 0
7 -2 7 -7 8 2 -14
3 -1 8 -6 9 4 -3
10 -1 8 -5 11 0 -12
-3 -1 8 -3 6 0 -10
2 -1 9 -9 8 -1 -12
5 1 6 -8 8 -3 9
1 -4 7 -8 9 -5 -11

output:

7

result:

ok Answer correct.

Test #8:

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

input:

7 7 0
2 7 -13 2 3 -10 -8
-11 6 -11 0 4 -5 -15
7 8 -13 2 6 -7 8
8 10 -15 10 4 -8 0
7 10 -13 8 4 -8 7
-9 12 -13 7 4 -8 0
-8 11 -14 4 4 -9 9

output:

6

result:

ok Answer correct.

Test #9:

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

input:

7 6 0
-11 8 9 -4 -1 15
-12 8 15 -5 -2 -12
3 12 15 -7 0 -9
-12 12 11 -9 4 3
-12 10 12 -8 2 8
4 12 11 -11 2 -10
5 10 7 -9 0 -13

output:

5

result:

ok Answer correct.

Test #10:

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

input:

7 7 0
-5 2 -2 5 -4 -9 -14
15 4 -2 7 -3 -7 -6
-10 4 -1 7 -3 -11 -11
-10 5 1 8 -5 -10 13
-5 5 1 3 -4 -11 10
-14 7 -4 3 -4 -10 10
-14 0 -3 4 -5 -10 8

output:

5

result:

ok Answer correct.

Test #11:

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

input:

7 7 0
-5 2 -2 7 -4 -9 -14
15 4 -2 9 -3 -7 -6
-10 4 -1 10 -3 -11 -11
-10 5 1 11 -5 -10 13
-5 5 1 5 -4 -11 10
-14 7 -4 5 -4 -10 10
-14 0 -3 6 -5 -10 8

output:

6

result:

ok Answer correct.

Test #12:

score: 1
Accepted
time: 2ms
memory: 11132kb

input:

7 7 0
15 -4 -5 5 8 -10 -6
-15 -3 -6 6 7 -2 7
13 -4 -6 6 14 -2 -14
2 -4 -7 9 12 -4 -7
14 -5 -4 9 12 -5 15
6 -4 -5 7 10 -7 9
9 -4 -5 7 9 -9 15

output:

4

result:

ok Answer correct.

Test #13:

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

input:

7 7 0
15 -4 -5 -3 8 -10 -6
-15 -3 -6 -2 7 -2 7
13 -4 -6 -2 14 -2 -14
2 -4 -7 2 12 -4 -7
14 -5 -4 1 12 -5 15
6 -4 -5 -1 10 -7 9
9 -4 -5 -1 9 -9 15

output:

5

result:

ok Answer correct.

Test #14:

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

input:

7 6 0
-13 9 -7 -8 9 -8
-12 14 -9 -6 9 7
-9 14 -8 -6 10 -15
15 12 -11 -5 9 9
-4 10 -13 -2 7 12
12 10 -12 -2 6 -9
9 9 -15 -1 5 4

output:

3

result:

ok Answer correct.

Test #15:

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

input:

7 5 0
12 10 6 -14 15
14 13 4 -10 -4
3 14 6 -10 -4
13 13 5 -13 -13
-8 11 3 -11 -12
7 11 4 -11 -9
-15 8 5 -12 15

output:

4

result:

ok Answer correct.

Test #16:

score: 1
Accepted
time: 2ms
memory: 11140kb

input:

6 7 0
3 -15 -10 -6 -6 -7 10
-3 -14 -8 -4 -8 -6 -7
2 -13 -6 -4 -10 -3 -11
14 -11 -4 -7 -11 -2 11
2 -9 -10 -9 -11 0 5
-10 -15 -12 -8 -10 -2 -7

output:

5

result:

ok Answer correct.

Test #17:

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

input:

6 7 0
9 9 -5 1 -13 9 -2
-13 9 -4 0 -10 14 -9
-11 9 -5 1 -4 12 7
4 8 -3 4 -6 10 9
-4 10 -3 3 -8 7 3
-7 9 -4 2 -11 5 -13

output:

6

result:

ok Answer correct.

Test #18:

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

input:

7 7 0
7 -13 4 -6 -14 1 -3
13 -14 6 -7 -15 12 -2
12 -14 5 -6 -10 11 -15
-6 -14 6 -1 -9 9 12
7 -14 7 0 -11 7 -5
9 -15 10 -3 -12 5 7
1 -13 7 -5 -14 3 9

output:

6

result:

ok Answer correct.

Test #19:

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

input:

7 7 0
12 6 -6 -6 8 7 -6
-15 7 -3 -4 9 9 12
-2 9 -2 -2 10 6 13
-3 11 -1 -1 8 4 7
-10 13 0 -7 7 4 2
13 14 -5 -9 8 5 8
-9 4 -5 -8 7 5 7

output:

7

result:

ok Answer correct.

Subtask #2:

score: 1
Accepted

Test #20:

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

input:

2 2 1
-7 -1
-12 2

output:

2
0 -8
-5 -5

result:

ok Answer and construction are correct.

Test #21:

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

input:

2 7 1
-8 -9 -8 2 -6 -3 -10
2 -14 -8 11 0 -12 -14

output:

2
0 -42
20 -55

result:

ok Answer and construction are correct.

Test #22:

score: 1
Accepted
time: 2ms
memory: 12888kb

input:

7 2 1
2 -7
-4 14
9 0
-9 0
10 -2
-9 2
-1 -7

output:

2
0 -5
-6 16
7 2
-11 2
8 0
-11 4
-3 -5

result:

ok Answer and construction are correct.

Test #23:

score: 1
Accepted
time: 2ms
memory: 12888kb

input:

7 7 1
5 5 14 3 1 10 3
9 14 13 -1 9 -6 3
-8 15 3 -15 0 -4 -3
14 11 12 11 -7 -6 -8
1 -10 -15 0 -14 -4 13
2 -1 0 6 -10 -2 14
-5 -13 -7 -8 0 3 4

output:

4
0 0 0 41
4 0 12 25
-13 1 9 -9
9 0 41 -23
-4 0 0 -25
15 0 18 -24
8 0 0 -34

result:

ok Answer and construction are correct.

Test #24:

score: 1
Accepted
time: 2ms
memory: 11172kb

input:

7 7 1
-8 -9 -14 -11 -4 -13 -10
-12 -8 -2 -9 0 -10 -5
-10 -8 -11 0 -3 -4 -1
-5 -6 -3 5 3 1 -6
-4 -11 -8 6 0 4 -3
-7 -2 -7 -6 -7 2 -11
-5 -12 -12 -9 -11 -13 -5

output:

4
0 0 0 -69
-3 0 21 -64
-1 0 24 -60
4 0 50 -65
5 0 41 -62
2 10 20 -70
4 0 0 -71

result:

ok Answer and construction are correct.

Test #25:

score: 1
Accepted
time: 2ms
memory: 11060kb

input:

7 7 1
-6 3 -6 -11 -5 6 3
3 3 -6 -10 -4 9 -11
6 3 -6 -10 0 8 12
14 2 -6 -5 -1 7 3
0 0 -2 -6 -1 6 -15
9 1 -3 -7 -2 6 4
-13 1 -4 -8 -2 6 -14

output:

6
0 0 0 0 0 -16
11 0 0 0 3 -30
16 0 0 2 2 -7
25 0 3 1 1 -16
11 2 1 2 0 -34
21 0 2 0 0 -15
-1 0 0 0 0 -33

result:

ok Answer and construction are correct.

Test #26:

score: 1
Accepted
time: 2ms
memory: 11988kb

input:

7 7 1
7 -2 7 -7 8 2 -14
3 -1 8 -6 9 4 -3
10 -1 8 -5 11 0 -12
-3 -1 8 -3 6 0 -10
2 -1 9 -9 8 -1 -12
5 1 6 -8 8 -3 9
1 -4 7 -8 9 -5 -11

output:

7
0 0 0 0 0 0 1
-4 0 0 0 0 6 12
3 0 0 0 3 4 1
-10 0 0 2 1 3 1
-5 0 1 0 0 2 -2
-2 2 0 0 0 1 17
-6 0 0 0 0 0 -5

result:

ok Answer and construction are correct.

Test #27:

score: 1
Accepted
time: 2ms
memory: 13160kb

input:

7 7 1
2 7 -13 2 3 -10 -8
-11 6 -11 0 4 -5 -15
7 8 -13 2 6 -7 8
8 10 -15 10 4 -8 0
7 10 -13 8 4 -8 7
-9 12 -13 7 4 -8 0
-8 11 -14 4 4 -9 9

output:

6
0 0 0 0 0 -17
-12 0 0 0 4 -24
8 0 0 2 2 -1
11 0 6 0 1 -9
11 1 0 0 5 -2
-4 0 0 2 4 -9
-3 0 0 0 0 0

result:

ok Answer and construction are correct.

Test #28:

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

input:

7 6 1
-11 8 9 -4 -1 15
-12 8 15 -5 -2 -12
3 12 15 -7 0 -9
-12 12 11 -9 4 3
-12 10 12 -8 2 8
4 12 11 -11 2 -10
5 10 7 -9 0 -13

output:

5
0 0 0 0 16
-1 0 0 6 -13
16 0 2 6 -10
1 0 2 4 2
1 0 2 2 7
17 2 0 2 -13
18 0 0 0 -18

result:

ok Answer and construction are correct.

Test #29:

score: 1
Accepted
time: 2ms
memory: 12188kb

input:

7 7 1
-5 2 -2 5 -4 -9 -14
15 4 -2 7 -3 -7 -6
-10 4 -1 7 -3 -11 -11
-10 5 1 8 -5 -10 13
-5 5 1 3 -4 -11 10
-14 7 -4 3 -4 -10 10
-14 0 -3 4 -5 -10 8

output:

5
0 0 0 0 -27
20 0 0 7 -19
-5 0 1 5 -26
-5 1 4 4 -2
0 1 3 2 -7
-9 3 0 2 -8
-9 0 0 0 -11

result:

ok Answer and construction are correct.

Test #30:

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

input:

7 7 1
-5 2 -2 7 -4 -9 -14
15 4 -2 9 -3 -7 -6
-10 4 -1 10 -3 -11 -11
-10 5 1 11 -5 -10 13
-5 5 1 5 -4 -11 10
-14 7 -4 5 -4 -10 10
-14 0 -3 6 -5 -10 8

output:

6
0 0 0 0 0 -25
20 0 0 0 7 -17
-5 0 0 2 5 -24
-5 0 3 3 4 0
0 0 3 1 2 -5
-9 2 1 0 2 -6
-9 0 0 0 0 -9

result:

ok Answer and construction are correct.

Test #31:

score: 1
Accepted
time: 2ms
memory: 11068kb

input:

7 7 1
15 -4 -5 5 8 -10 -6
-15 -3 -6 6 7 -2 7
13 -4 -6 6 14 -2 -14
2 -4 -7 9 12 -4 -7
14 -5 -4 9 12 -5 15
6 -4 -5 7 10 -7 9
9 -4 -5 7 9 -9 15

output:

4
0 0 0 3
-29 0 7 16
0 3 9 -5
-11 5 5 2
2 6 4 24
-5 1 2 18
-2 0 0 24

result:

ok Answer and construction are correct.

Test #32:

score: 1
Accepted
time: 2ms
memory: 11204kb

input:

7 7 1
15 -4 -5 -3 8 -10 -6
-15 -3 -6 -2 7 -2 7
13 -4 -6 -2 14 -2 -14
2 -4 -7 2 12 -4 -7
14 -5 -4 1 12 -5 15
6 -4 -5 -1 10 -7 9
9 -4 -5 -1 9 -9 15

output:

5
0 0 0 0 -5
-29 0 0 7 8
0 0 3 9 -13
-11 0 6 5 -6
2 1 5 4 16
-5 0 1 2 10
-2 0 0 0 16

result:

ok Answer and construction are correct.

Test #33:

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

input:

7 6 1
-13 9 -7 -8 9 -8
-12 14 -9 -6 9 7
-9 14 -8 -6 10 -15
15 12 -11 -5 9 9
-4 10 -13 -2 7 12
12 10 -12 -2 6 -9
9 9 -15 -1 5 4

output:

3
0 0 -18
1 5 -3
4 7 -25
28 3 -2
9 2 -1
25 3 -23
22 0 -11

result:

ok Answer and construction are correct.

Test #34:

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

input:

7 5 1
12 10 6 -14 15
14 13 4 -10 -4
3 14 6 -10 -4
13 13 5 -13 -13
-8 11 3 -11 -12
7 11 4 -11 -9
-15 8 5 -12 15

output:

4
0 0 0 29
2 0 5 10
-9 1 7 10
1 1 3 0
-20 0 2 1
-5 0 3 4
-27 0 0 28

result:

ok Answer and construction are correct.

Test #35:

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

input:

6 7 1
3 -15 -10 -6 -6 -7 10
-3 -14 -8 -4 -8 -6 -7
2 -13 -6 -4 -10 -3 -11
14 -11 -4 -7 -11 -2 11
2 -9 -10 -9 -11 0 5
-10 -15 -12 -8 -10 -2 -7

output:

5
0 0 0 0 -31
-6 0 0 5 -49
-1 0 3 6 -53
11 2 5 3 -31
-1 4 1 1 -37
-13 0 0 0 -51

result:

ok Answer and construction are correct.

Test #36:

score: 1
Accepted
time: 2ms
memory: 11200kb

input:

6 7 1
9 9 -5 1 -13 9 -2
-13 9 -4 0 -10 14 -9
-11 9 -5 1 -4 12 7
4 8 -3 4 -6 10 9
-4 10 -3 3 -8 7 3
-7 9 -4 2 -11 5 -13

output:

6
0 0 0 0 0 8
-20 0 0 0 6 1
-18 0 0 6 4 17
-2 0 3 4 2 19
-9 1 2 2 1 11
-12 0 0 0 0 -7

result:

ok Answer and construction are correct.

Test #37:

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

input:

7 7 1
7 -13 4 -6 -14 1 -3
13 -14 6 -7 -15 12 -2
12 -14 5 -6 -10 11 -15
-6 -14 6 -1 -9 9 12
7 -14 7 0 -11 7 -5
9 -15 10 -3 -12 5 7
1 -13 7 -5 -14 3 9

output:

6
0 0 0 0 0 -24
7 0 0 0 9 -23
7 0 0 4 8 -36
-9 0 4 5 6 -9
4 1 5 3 4 -26
6 3 2 2 2 -14
0 0 0 0 0 -12

result:

ok Answer and construction are correct.

Test #38:

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

input:

7 7 1
12 6 -6 -6 8 7 -6
-15 7 -3 -4 9 9 12
-2 9 -2 -2 10 6 13
-3 11 -1 -1 8 4 7
-10 13 0 -7 7 4 2
13 14 -5 -9 8 5 8
-9 4 -5 -8 7 5 7

output:

7
0 0 0 0 0 0 15
-27 0 0 0 0 9 33
-14 0 0 0 6 7 33
-15 0 0 4 5 6 25
-22 0 3 3 3 4 18
1 1 2 2 2 2 24
-21 0 0 0 0 0 22

result:

ok Answer and construction are correct.

Subtask #3:

score: 1
Accepted

Test #39:

score: 1
Accepted
time: 2ms
memory: 11380kb

input:

60 60 0
62702 526562 -609371 334022 -172154 -305158 -396796 590471 743779 -455356 -476787 510351 147001 -486618 717200 501155 312031 -544920 -338268 8321 -456815 -451662 649708 110768 887580 421135 -982335 39081 83817 -679352 530047 -564417 232588 617916 -221606 -922122 398130 -605249 329409 943395 ...

output:

9

result:

ok Answer correct.

Test #40:

score: 1
Accepted
time: 2ms
memory: 11220kb

input:

57 63 0
-892722 -648569 -561451 -241653 -164069 -67434 -396331 -91582 -871021 -102017 -944166 -434663 -205096 -40666 -554022 -619718 -36528 -505647 -762223 -629834 -937385 -291427 -976359 -647179 -495047 -802457 -974905 -508476 -243364 -302882 -890469 -113917 -916485 -526567 -81282 -722510 -919315 -...

output:

8

result:

ok Answer correct.

Test #41:

score: 1
Accepted
time: 3ms
memory: 14432kb

input:

63 57 0
-170879 -81590 -372349 -788865 -640335 -326017 -864131 -761493 -938494 -978698 -660421 -94039 -58259 -607891 -437915 -10382 -483779 -480899 -191543 -338922 -624168 -997521 -636419 -894293 -635733 -331788 -163554 -320534 -649166 -27959 -410387 -15373 -144467 -354724 -825220 -425986 -643590 -8...

output:

7

result:

ok Answer correct.

Test #42:

score: 1
Accepted
time: 3ms
memory: 11300kb

input:

60 60 0
-55167 -495548 683241 -564191 973629 -685567 -574366 903418 884579 -462985 208918 921557 -190541 39956 -737920 709222 291152 903276 498770 167578 -712620 -942114 -879056 -640602 -514119 -798735 -410020 895984 -247445 -474415 -345842 384578 -770720 697010 323885 35345 -661399 -499806 783776 4...

output:

41

result:

ok Answer correct.

Test #43:

score: 1
Accepted
time: 3ms
memory: 13108kb

input:

60 60 0
598463 -832986 -708594 372597 861478 -184023 -664571 -378431 -799737 147548 724643 819314 85798 802818 683447 172544 -300396 -925647 52009 90237 -570827 -911836 -894216 -661823 -439249 240843 722772 -873438 395896 803206 554835 454958 110436 234898 -556779 623855 -839843 715488 -762985 37965...

output:

41

result:

ok Answer correct.

Test #44:

score: 1
Accepted
time: 3ms
memory: 11416kb

input:

60 57 0
137126 -313473 72626 54752 -818130 22657 712868 -429985 -28687 -346923 40218 -126610 -438302 190653 -140608 772515 5422 223008 192527 526273 -782131 -696741 -493700 127532 -846609 -536820 -155295 682339 -953514 -437582 -374765 -43277 494048 404912 533751 -46230 288009 -882939 -810619 452652 ...

output:

41

result:

ok Answer correct.

Test #45:

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

input:

60 60 0
343477 45498 481668 709340 287051 -347246 -718175 -465752 -58649 116593 761395 131348 -541192 514572 -914590 606062 468442 -301105 396196 398540 23173 16330 -617465 -83328 -708463 -909671 201306 -542245 -227587 -510977 -877752 -819214 88425 -39748 -624994 -786917 500791 -499627 22634 -448815...

output:

22

result:

ok Answer correct.

Test #46:

score: 1
Accepted
time: 3ms
memory: 14344kb

input:

60 60 0
343477 45498 481668 709340 287051 -347246 -718175 -465752 -58649 116593 761395 131348 -541192 514572 -914590 606062 468442 -301105 396196 398540 23173 16330 -617465 -83328 -708463 -909671 201306 -542245 -227587 -510977 -877752 -819214 88425 -39748 -624994 -786917 500791 -499627 22634 -448815...

output:

25

result:

ok Answer correct.

Test #47:

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

input:

60 60 0
62450 -518816 -771490 549853 -29660 885522 235812 -459721 -253581 431738 396000 -210646 -852439 -900421 196788 -660024 41750 -434131 240757 187789 7228 95640 -236464 -727389 -514811 265504 -695517 -356544 352996 -524939 -627949 -773515 128114 -790700 -799068 -869661 -707502 83151 171861 -829...

output:

54

result:

ok Answer correct.

Test #48:

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

input:

60 60 0
62450 -518816 -771490 549853 -29660 885522 235812 -459721 -253581 431738 396000 -210646 -852439 -654514 196788 -660024 41750 -434131 240757 187789 7228 95640 -236464 -727389 -514811 265504 -695517 -356544 352996 -524939 -627949 -773515 128114 -790700 -799068 -869661 -707502 83151 171861 -829...

output:

55

result:

ok Answer correct.

Test #49:

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

input:

60 60 0
-519345 685460 916754 834006 660017 -307201 223019 623147 -930347 -431802 -45644 -968920 -381485 456614 41359 -904927 -78517 -872517 519407 -642007 149684 -894010 -443598 -127280 -129922 -685011 -672227 -129143 -43233 -301183 54884 -861909 -378143 -930519 -98958 -910467 -235951 -329253 -9465...

output:

59

result:

ok Answer correct.

Test #50:

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

input:

60 60 0
-519345 685460 916754 834006 660017 -307201 223019 623147 -930347 -431802 -45644 -968920 -381485 456614 41359 -904927 -78517 -872517 519407 -642007 149684 -894010 -443598 -127280 -129922 -685011 -672227 -129143 -43233 -301183 54884 -861909 -378143 -930519 -98958 -910467 -235951 -329253 -9465...

output:

60

result:

ok Answer correct.

Test #51:

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

input:

50 70 0
422615 531619 -753355 -885663 531722 -450140 24763 -444945 63534 804197 -74246 -402257 -352432 -343856 -97162 -929161 109260 598198 -561413 281480 205206 -224996 -685422 -732526 -486679 43245 -335581 -199557 -243200 -736926 145537 -236762 -428446 23334 -414567 -188105 -488099 -178237 172480 ...

output:

48

result:

ok Answer correct.

Test #52:

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

input:

50 70 0
343637 -983974 -172832 -772613 -901432 -485101 17920 -549490 -911911 -965691 -612950 -329511 -726160 -561372 -616419 -245081 -157926 -726959 -69517 -468304 -87368 -425457 -437007 -291411 -281600 -665346 -167378 -369025 -60370 -471753 -443351 -822457 -937571 -845528 -363972 -51811 -351542 -52...

output:

50

result:

ok Answer correct.

Test #53:

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

input:

64 56 0
-529865 -947734 -408528 -269762 -888717 631560 -180164 -475827 -477756 -102544 -898592 87670 -371882 -756484 221858 -295650 207673 -379172 -515344 183652 217992 -416272 -206922 -399447 -382563 -372811 -558957 -166774 -640644 -354772 -740826 -741836 -528076 -331446 -956279 -254653 -954467 -74...

output:

36

result:

ok Answer correct.

Test #54:

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

input:

64 55 0
-140566 -325153 -565235 -412957 -950860 -967086 -332825 -815298 -817535 -393922 -317225 -610452 -486591 -649214 -388740 -11142 -820398 -741023 -763588 -222830 -792129 -668836 -139163 -866135 -25986 -892513 -702551 31653 -541314 -965014 -691874 -391620 -669002 -556970 -641296 81526 69432 -792...

output:

39

result:

ok Answer correct.

Test #55:

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

input:

65 54 0
-621973 -867860 -718140 -434419 -274140 362754 125722 -508877 194252 676853 -89323 346941 227593 148559 9329 -654148 689402 -965352 -34388 -824825 -782429 281419 -954923 84902 -545257 -159191 -680719 13363 154456 163397 448646 349726 -728843 -435219 203475 -732384 -388000 -967357 -937472 381...

output:

32

result:

ok Answer correct.

Test #56:

score: 1
Accepted
time: 3ms
memory: 13364kb

input:

65 55 0
-968743 -273622 -425615 -260264 -853086 370057 562637 135892 6832 696981 -926322 -200138 -146031 -88061 -414291 -729783 -474494 30823 -774836 -676779 212595 356026 -875491 581724 -352829 689070 -215376 -54672 -384840 4433 -410023 -185468 -794895 138484 -815749 -851963 -223931 -774800 -663664...

output:

34

result:

ok Answer correct.

Subtask #4:

score: 1
Accepted

Test #57:

score: 1
Accepted
time: 2ms
memory: 12156kb

input:

60 60 1
62702 526562 -609371 334022 -172154 -305158 -396796 590471 743779 -455356 -476787 510351 147001 -486618 717200 501155 312031 -544920 -338268 8321 -456815 -451662 649708 110768 887580 421135 -982335 39081 83817 -679352 530047 -564417 232588 617916 -221606 -922122 398130 -605249 329409 943395 ...

output:

9
0 0 0 0 0 0 0 0 4326644
-139817 0 0 0 0 0 0 2397268 -4761557
1159508 0 0 0 0 0 0 8612496 -7854345
-305167 0 0 0 0 0 0 8807559 -10631000
982022 0 0 0 0 0 2098910 11736481 -11349369
643707 0 0 0 0 47768 3909980 1949845 -12840447
2473022 0 0 0 0 2249847 7271659 4953832 -13810486
2197947 0 0 0 0 23497...

result:

ok Answer and construction are correct.

Test #58:

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

input:

57 63 1
-892722 -648569 -561451 -241653 -164069 -67434 -396331 -91582 -871021 -102017 -944166 -434663 -205096 -40666 -554022 -619718 -36528 -505647 -762223 -629834 -937385 -291427 -976359 -647179 -495047 -802457 -974905 -508476 -243364 -302882 -890469 -113917 -916485 -526567 -81282 -722510 -919315 -...

output:

8
0 0 0 0 0 0 0 -35033014
633492 0 0 0 0 0 6521765 -35572519
715351 0 0 0 0 0 2599641 -35439605
787820 0 0 0 0 690247 1380340 -35074054
972373 0 0 0 0 3318986 0 -36708874
917707 0 0 0 356794 0 3876121 -37469589
1321463 0 0 0 0 3715012 3648676 -40003993
1250127 0 0 0 0 1707279 1114907 -41354294
12635...

result:

ok Answer and construction are correct.

Test #59:

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

input:

63 57 1
-170879 -81590 -372349 -788865 -640335 -326017 -864131 -761493 -938494 -978698 -660421 -94039 -58259 -607891 -437915 -10382 -483779 -480899 -191543 -338922 -624168 -997521 -636419 -894293 -635733 -331788 -163554 -320534 -649166 -27959 -410387 -15373 -144467 -354724 -825220 -425986 -643590 -8...

output:

7
0 0 0 0 0 0 -29227665
-17172 0 0 0 0 2669411 -29298212
40518 0 0 0 2116934 3032496 -29405434
-320920 0 0 584554 2238553 1355000 -29697908
308753 0 0 4167964 1520656 1059091 -31509483
-131927 0 1573922 1024273 944627 2740476 -32082967
-332500 0 369584 609494 2980508 2480278 -32762933
-287237 64914 ...

result:

ok Answer and construction are correct.

Test #60:

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

input:

60 60 1
-55167 -495548 683241 -564191 973629 -685567 -574366 903418 884579 -462985 208918 921557 -190541 39956 -737920 709222 291152 903276 498770 167578 -712620 -942114 -879056 -640602 -514119 -798735 -410020 895984 -247445 -474415 -345842 384578 -770720 697010 323885 35345 -661399 -499806 783776 4...

output:

41
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -4210649
804818 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 211443 -3767325
-295883 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 248638 211443 -3907229
-521...

result:

ok Answer and construction are correct.

Test #61:

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

input:

60 60 1
598463 -832986 -708594 372597 861478 -184023 -664571 -378431 -799737 147548 724643 819314 85798 802818 683447 172544 -300396 -925647 52009 90237 -570827 -911836 -894216 -661823 -439249 240843 722772 -873438 395896 803206 554835 454958 110436 234898 -556779 623855 -839843 715488 -762985 37965...

output:

41
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1982919
-1093771 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 306814 -1921370
-260676 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 243851 311549 -1053990
-8...

result:

ok Answer and construction are correct.

Test #62:

score: 1
Accepted
time: 3ms
memory: 11904kb

input:

60 57 1
137126 -313473 72626 54752 -818130 22657 712868 -429985 -28687 -346923 40218 -126610 -438302 190653 -140608 772515 5422 223008 192527 526273 -782131 -696741 -493700 127532 -846609 -536820 -155295 682339 -953514 -437582 -374765 -43277 494048 404912 533751 -46230 288009 -882939 -810619 452652 ...

output:

41
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -4867388
-30416 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 348438 -5463220
477603 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 245617 348438 -4696799
-2407...

result:

ok Answer and construction are correct.

Test #63:

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

input:

60 60 1
343477 45498 481668 709340 287051 -347246 -718175 -465752 -58649 116593 761395 131348 -541192 514572 -914590 606062 468442 -301105 396196 398540 23173 16330 -617465 -83328 -708463 -909671 201306 -542245 -227587 -510977 -877752 -819214 88425 -39748 -624994 -786917 500791 -499627 22634 -448815...

output:

22
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -16482959
-28885 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1550892 -16672946
-867469 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1364041 1539657 -15921342
-50200 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1529521 1341161 1539657 -16629506
-508378 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

result:

ok Answer and construction are correct.

Test #64:

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

input:

60 60 1
343477 45498 481668 709340 287051 -347246 -718175 -465752 -58649 116593 761395 131348 -541192 514572 -914590 606062 468442 -301105 396196 398540 23173 16330 -617465 -83328 -708463 -909671 201306 -542245 -227587 -510977 -877752 -819214 88425 -39748 -624994 -786917 500791 -499627 22634 -448815...

output:

25
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -17063236
-28885 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1550892 -17253223
-867469 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1364041 1539657 -16501619
-50200 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1529521 1341161 1539657 -17209783
-508378 0 0 0...

result:

ok Answer and construction are correct.

Test #65:

score: 1
Accepted
time: 2ms
memory: 11272kb

input:

60 60 1
62450 -518816 -771490 549853 -29660 885522 235812 -459721 -253581 431738 396000 -210646 -852439 -900421 196788 -660024 41750 -434131 240757 187789 7228 95640 -236464 -727389 -514811 265504 -695517 -356544 352996 -524939 -627949 -773515 128114 -790700 -799068 -869661 -707502 83151 171861 -829...

output:

54
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -19403749
648410 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1273877 -20287078
-72652 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 Answer and construction are correct.

Test #66:

score: 1
Accepted
time: 2ms
memory: 11956kb

input:

60 60 1
62450 -518816 -771490 549853 -29660 885522 235812 -459721 -253581 431738 396000 -210646 -852439 -654514 196788 -660024 41750 -434131 240757 187789 7228 95640 -236464 -727389 -514811 265504 -695517 -356544 352996 -524939 -627949 -773515 128114 -790700 -799068 -869661 -707502 83151 171861 -829...

output:

55
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -19157842
648410 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1273877 -20041171
-72652 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

result:

ok Answer and construction are correct.

Test #67:

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

input:

60 60 1
-519345 685460 916754 834006 660017 -307201 223019 623147 -930347 -431802 -45644 -968920 -381485 456614 41359 -904927 -78517 -872517 519407 -642007 149684 -894010 -443598 -127280 -129922 -685011 -672227 -129143 -43233 -301183 54884 -861909 -378143 -930519 -98958 -910467 -235951 -329253 -9465...

output:

59
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -21946832
1323024 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1352652 -22162956
-134606 0 0 0 0 0 0 0 0 0 0 0 0 0...

result:

ok Answer and construction are correct.

Test #68:

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

input:

60 60 1
-519345 685460 916754 834006 660017 -307201 223019 623147 -930347 -431802 -45644 -968920 -381485 456614 41359 -904927 -78517 -872517 519407 -642007 149684 -894010 -443598 -127280 -129922 -685011 -672227 -129143 -43233 -301183 54884 -861909 -378143 -930519 -98958 -910467 -235951 -329253 -9465...

output:

60
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -21374854
1323024 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1352652 -21590978
-134606 0 0 0 0 0 0 0 0 0 0 0...

result:

ok Answer and construction are correct.

Test #69:

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

input:

50 70 1
422615 531619 -753355 -885663 531722 -450140 24763 -444945 63534 804197 -74246 -402257 -352432 -343856 -97162 -929161 109260 598198 -561413 281480 205206 -224996 -685422 -732526 -486679 43245 -335581 -199557 -243200 -736926 145537 -236762 -428446 23334 -414567 -188105 -488099 -178237 172480 ...

output:

48
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -22734587
-1380223 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1810316 -23531270
-1277836 0 0 0 0 0 0 0 0 0 0 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 Answer and construction are correct.

Test #70:

score: 1
Accepted
time: 3ms
memory: 14600kb

input:

50 70 1
343637 -983974 -172832 -772613 -901432 -485101 17920 -549490 -911911 -965691 -612950 -329511 -726160 -561372 -616419 -245081 -157926 -726959 -69517 -468304 -87368 -425457 -437007 -291411 -281600 -665346 -167378 -369025 -60370 -471753 -443351 -822457 -937571 -845528 -363972 -51811 -351542 -52...

output:

50
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -21499781
-64018 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1638602 -21294526
-946011 0 0 0 0 0 0 0 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 Answer and construction are correct.

Test #71:

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

input:

64 56 1
-529865 -947734 -408528 -269762 -888717 631560 -180164 -475827 -477756 -102544 -898592 87670 -371882 -756484 221858 -295650 207673 -379172 -515344 183652 217992 -416272 -206922 -399447 -382563 -372811 -558957 -166774 -640644 -354772 -740826 -741836 -528076 -331446 -956279 -254653 -954467 -74...

output:

36
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -24524613
971353 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1505012 -23645233
327912 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1377217 1479642 -25157010
-250854 0 0 0 0 0 0 0 0 0 0 0...

result:

ok Answer and construction are correct.

Test #72:

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

input:

64 55 1
-140566 -325153 -565235 -412957 -950860 -967086 -332825 -815298 -817535 -393922 -317225 -610452 -486591 -649214 -388740 -11142 -820398 -741023 -763588 -222830 -792129 -668836 -139163 -866135 -25986 -892513 -702551 31653 -541314 -965014 -691874 -391620 -669002 -556970 -641296 81526 69432 -792...

output:

39
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -22972172
95154 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1787105 -23135414
224070 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1259402 1756879 -22187875
-9111 0 0 0 ...

result:

ok Answer and construction are correct.

Test #73:

score: 1
Accepted
time: 3ms
memory: 13084kb

input:

65 54 1
-621973 -867860 -718140 -434419 -274140 362754 125722 -508877 194252 676853 -89323 346941 227593 148559 9329 -654148 689402 -965352 -34388 -824825 -782429 281419 -954923 84902 -545257 -159191 -680719 13363 154456 163397 448646 349726 -728843 -435219 203475 -732384 -388000 -967357 -937472 381...

output:

32
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -10819614
1421370 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 776889 -10849995
1546121 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 555767 768870 -12108424
-60810 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 Answer and construction are correct.

Test #74:

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

input:

65 55 1
-968743 -273622 -425615 -260264 -853086 370057 562637 135892 6832 696981 -926322 -200138 -146031 -88061 -414291 -729783 -474494 30823 -774836 -676779 212595 356026 -875491 581724 -352829 689070 -215376 -54672 -384840 4433 -410023 -185468 -794895 138484 -815749 -851963 -223931 -774800 -663664...

output:

34
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -12737130
1665024 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 776889 -12009230
496970 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 555767 768870 -12516629
1476159 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

result:

ok Answer and construction are correct.

Subtask #5:

score: 1
Accepted

Test #75:

score: 1
Accepted
time: 27ms
memory: 32676kb

input:

400 400 0
707465 -49586 560402 -104636 -877366 739213 92622 -122892 996879 67727 -190038 186457 612178 -793767 575546 -823464 -202458 -968075 105308 561106 463901 542257 -782083 -303272 -877710 -219170 -200789 -957512 223655 -28108 972736 921341 -234756 707837 -301103 -162098 -213224 952623 -533971 ...

output:

11

result:

ok Answer correct.

Test #76:

score: 1
Accepted
time: 23ms
memory: 34372kb

input:

395 400 0
-817850 -726791 -174300 -699138 -126701 -879308 -615051 -629536 -23506 -117063 -817030 -142509 -927219 -983311 -389311 -13850 -310901 -612925 -175491 -26788 -34224 -743162 -980424 -301776 -551976 -116752 -863563 -279464 -398863 -377117 -66718 -125758 -397348 -848557 -464433 -145191 -448166...

output:

11

result:

ok Answer correct.

Test #77:

score: 1
Accepted
time: 14ms
memory: 33164kb

input:

400 395 0
-998675 -489744 -990052 -574982 -719106 -889202 -623047 -815364 -913661 -92916 -943004 -371365 -526775 -624770 -779007 -509352 -277189 -112119 -27029 -215233 -12662 -359427 -743713 -617537 -624537 -772785 -841203 -767438 -634249 -553061 -205957 -220812 -630481 -126495 -961750 -385846 -1353...

output:

11

result:

ok Answer correct.

Test #78:

score: 1
Accepted
time: 360ms
memory: 33072kb

input:

400 400 0
-457908 -137741 486487 519134 -456559 530223 -354664 165501 662631 -712609 739506 705683 249289 956226 -950868 896384 -717498 -141572 966759 326369 111329 -512605 535717 476883 61344 -842329 882227 160917 -538826 231294 -337583 -92593 -386637 630927 43861 472481 -232840 -110442 862658 1095...

output:

283

result:

ok Answer correct.

Test #79:

score: 1
Accepted
time: 367ms
memory: 28652kb

input:

400 400 0
77407 -769615 -688606 -888137 -816103 -230971 -498019 -407777 -773765 569 -477909 -982473 -612244 -23203 -946511 -740343 -321154 -572838 -840117 -557708 -976242 -683170 -930294 -941215 -520365 -137337 -274228 9788 -297338 -205135 -380313 -911294 -991463 -705393 19292 -71788 -743149 -566574...

output:

282

result:

ok Answer correct.

Test #80:

score: 1
Accepted
time: 297ms
memory: 28176kb

input:

400 300 0
589415 -619753 -338865 719998 -629720 -243725 -575759 -229883 687259 -656115 315592 346810 311450 346991 -786664 476744 876957 -766709 -255095 -190427 264989 -695687 -930705 -213549 209339 -930152 452266 217628 7631 -218336 693499 -819552 787326 465087 156769 -339135 665668 -855028 -757317...

output:

283

result:

ok Answer correct.

Test #81:

score: 1
Accepted
time: 317ms
memory: 26640kb

input:

400 350 0
-338479 -529925 -130754 -392356 -392561 -389469 -621126 -796066 -819095 -425023 -498540 -179974 -985929 -368592 -10634 -190586 -467733 -432100 -523753 -302337 -884185 -964647 -719845 -284036 -237071 -722519 -308721 -935076 -929744 219149 153369 -915331 55013 -575571 -128579 186005 -829518 ...

output:

280

result:

ok Answer correct.

Test #82:

score: 1
Accepted
time: 3ms
memory: 11344kb

input:

336 5 0
448220 -352726 -63857 -400063 537721
915346 647274 936143 599937 -867519
-24986 647274 936143 609709 -832671
436861 647274 941113 599937 946784
-200422 647274 936143 599937 196242
357351 647274 936143 599937 841644
-267625 -352726 -63857 -400063 828688
-126192 647274 936143 599937 574962
-42...

output:

4

result:

ok Answer correct.

Test #83:

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

input:

342 5 0
952174 552624 749230 397442 892342
655756 552624 749230 397442 -797128
818665 552624 749230 397442 -178901
-144284 554184 749230 397442 281989
160704 552624 749230 397442 154696
-127887 -447376 -250770 -602558 -881344
-473044 552624 749230 397442 -618485
623289 552624 751382 401702 809840
65...

output:

5

result:

ok Answer correct.

Test #84:

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

input:

132 5 0
825749 -596647 -525205 -381506 410685
-211588 403353 474795 618494 982468
-918172 403353 474795 623445 -778634
506877 403353 474795 623445 776606
57992 403353 474795 618494 -479887
-893039 403353 474795 618494 489029
-422624 -596647 -525205 -381506 494722
-976048 403353 474795 618494 981005
...

output:

3

result:

ok Answer correct.

Test #85:

score: 1
Accepted
time: 2ms
memory: 12948kb

input:

138 5 0
-385181 -595263 -294237 -489565 798214
-782576 404737 705763 510435 -404951
754678 404737 705763 512140 -351228
-300433 404737 705763 512140 273766
875122 404737 705763 512140 -18373
287250 404737 705763 510435 226082
-545558 -595263 -294237 -489565 -815774
-845085 404737 705763 510435 -2486...

output:

4

result:

ok Answer correct.

Test #86:

score: 1
Accepted
time: 74ms
memory: 32764kb

input:

400 400 0
30288 -350297 395824 -636012 -208901 153330 479223 -181519 -279587 527222 552320 515249 -472719 814571 854602 -949376 -783426 474518 -74016 -308552 -54130 541033 -854581 -422475 576278 128775 816296 -226954 91300 -455519 608263 -451252 -44658 591598 -439772 619710 -85153 -408386 -964447 76...

output:

93

result:

ok Answer correct.

Test #87:

score: 1
Accepted
time: 66ms
memory: 33332kb

input:

400 400 0
30288 -350297 395824 -636012 -208901 153330 479223 -181519 -279587 527222 552320 515249 -472719 814571 854602 -949376 -783426 474518 -74016 -308552 -54130 541033 -854581 -422475 576278 128775 816296 -226954 91300 -455519 608263 -451252 -44658 591598 -439772 619710 -85153 -408386 -964447 76...

output:

94

result:

ok Answer correct.

Test #88:

score: 1
Accepted
time: 143ms
memory: 32872kb

input:

400 400 0
536426 -282847 199952 924476 -244238 647806 623800 606505 -570245 626123 785239 -67693 407355 495008 405145 -559984 13022 946150 332546 709771 -574828 -858070 -52109 -496149 351053 -832946 339481 -823320 194655 461573 51856 -86846 -871417 109593 -240145 728790 676969 -27398 -908401 344029 ...

output:

136

result:

ok Answer correct.

Test #89:

score: 1
Accepted
time: 139ms
memory: 34728kb

input:

400 400 0
536426 -282847 199952 924476 -244238 647806 623800 606505 -570245 626123 785239 -67693 407355 495008 405145 -559984 13022 946150 332546 709771 -574828 -858070 -52109 -496149 351053 -832946 339481 -823320 194655 461573 51856 -86846 -871417 109593 -240145 728790 676969 -27398 -908401 344029 ...

output:

137

result:

ok Answer correct.

Test #90:

score: 1
Accepted
time: 327ms
memory: 32424kb

input:

350 400 0
755381 -561920 -470744 -603899 -707819 -395110 -358167 342307 473366 569888 466871 247113 -725662 406870 -825162 -635961 148944 -872900 885011 -857653 313934 -692339 276091 516631 -873063 697278 270290 661843 -317618 467581 -298488 -926912 -699 724342 -597723 -34283 280288 99663 474125 -66...

output:

308

result:

ok Answer correct.

Test #91:

score: 1
Accepted
time: 316ms
memory: 28748kb

input:

350 399 0
-371358 -381363 -721382 -572202 -888427 -733575 -562965 -354716 -889664 -594028 -458037 -474471 -998880 -663405 -212515 -742052 -429668 -669045 -374488 -717703 -324135 -422695 -841245 -718918 -297688 -493870 -534708 -524958 -658028 -838841 -496962 -875301 -733505 -330242 79935 -898341 -788...

output:

309

result:

ok Answer correct.

Subtask #6:

score: 1
Accepted

Test #92:

score: 1
Accepted
time: 75ms
memory: 18624kb

input:

2000 15 1
-478752 42200 711330 -708652 -824359 226871 -297198 86527 776488 -504870 943406 770670 197609 -607282 -84312
-388741 -252530 915702 -281330 -323118 217562 -164691 -706384 -909748 -228223 -193707 260115 32906 -879007 -147113
-622226 318478 -956520 770386 763221 -489637 829725 -249877 551869...

output:

9
0 0 0 0 0 0 0 0 249676
90011 0 0 0 0 0 0 961403 -4099721
-143474 0 0 0 0 0 571008 5420452 -3159798
443665 0 0 0 0 0 1201101 5020947 -3751060
512645 0 0 0 0 871402 3435012 4157770 -4257624
432540 0 0 0 0 1753580 829631 3909175 -5360674
577990 0 0 0 0 2675683 719854 2430668 -6421030
-29873 0 0 0 0 0...

result:

ok Answer and construction are correct.

Test #93:

score: 1
Accepted
time: 28ms
memory: 55484kb

input:

100 3000 1
-913251 -604075 -240251 -600278 -993550 -54204 -412043 -729908 -43177 -434172 -315566 -180190 -997410 -129589 -418681 -232476 -103200 -205022 -425061 -745500 -201841 -163497 -344861 -964253 -63945 -906478 -429079 -534658 -874196 -874991 -608269 -945859 -97855 -143511 -752788 -188510 -7963...

output:

11
0 0 0 0 0 0 0 0 0 0 -1511004834
7778799 0 0 0 0 0 0 0 0 13246895 -1525194751
7892743 0 0 0 0 0 0 0 25695949 2939355075 -1525648873
7281578 0 0 0 0 0 0 0 48787249 2918754400 -1529933940
7506706 0 0 0 0 0 0 6657857 61247110 2917378339 -1530445162
7559239 0 0 0 0 0 6336735 10487466 47850981 29082347...

result:

ok Answer and construction are correct.

Test #94:

score: 1
Accepted
time: 55ms
memory: 21928kb

input:

1500 26 1
-494631 -848530 -945004 -657391 -21087 -425679 -319816 -833858 -673174 -38273 -287909 -127643 -724779 -753016 -813456 -146361 -886293 -647563 -528346 -276708 -400683 -339408 -757204 -331804 -482932 -484889
17110 -651353 -889875 -759834 -225225 -883166 -339120 -919096 -477859 -562449 -42002...

output:

10
0 0 0 0 0 0 0 0 0 -13246437
511741 0 0 0 0 0 0 0 252306 -15248776
173922 0 0 0 0 0 0 117780 2971148 -15719499
454700 0 0 0 0 0 0 3046707 1699314 -16704362
-208149 0 0 0 0 0 96322 1459311 1358383 -17968524
21257 0 0 0 0 0 0 117780 4868308 -18314515
-332028 0 0 0 0 0 0 1378592 3040743 -18678211
-22...

result:

ok Answer and construction are correct.

Test #95:

score: 1
Accepted
time: 278ms
memory: 30224kb

input:

500 240 1
567846 -790690 317263 -180513 -945677 -774455 962222 992180 202859 42233 -237468 -251367 -859118 338183 34569 816719 84170 349422 431718 434579 770185 911201 869961 -188447 -356807 579912 -918706 966762 805072 -580182 -224567 -860353 735556 -494868 818180 264289 -716336 284412 638544 -1246...

output:

221
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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 Answer and construction are correct.

Test #96:

score: 1
Accepted
time: 53ms
memory: 24228kb

input:

1000 60 1
-499897 420422 783593 -456783 -385027 -245944 388163 -14426 -686873 287353 532019 -32361 -335039 -987870 539917 -394901 -773350 -15528 -839491 443799 627358 392849 -464976 468812 -375095 204261 647987 -729766 -934320 593301 213258 697912 -557597 -420988 587141 362514 -248793 -629186 -96567...

output:

53
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2289547
-174406 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2761 -1715128
720457 0 0 0 0 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 Answer and construction are correct.

Test #97:

score: 1
Accepted
time: 14ms
memory: 20728kb

input:

1500 26 1
419251 496566 602229 684503 -200925 211015 950635 145225 -363128 -916823 -761105 -432664 790503 -186725 -655007 -747849 954246 742720 -514435 -696752 242718 -33070 -728365 290598 -843932 -314846
481166 496838 602171 684503 -201014 210966 951052 144908 -363241 -916875 -760564 -432917 790438...

output:

19
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -865417
62510 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -751948
-527239 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -22817
-350485 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 473 -1109672
529166 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1162 283930
-959702 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1162 -779432...

result:

ok Answer and construction are correct.

Test #98:

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

input:

630 6 1
36202 144030 641265 466058 292264 -90080
964003 144030 641265 466058 292264 508736
107836 144030 641265 467919 292264 90571
79815 144030 641265 466058 292264 -317166
494761 144030 641265 466058 292264 -990356
-628036 144030 641265 466058 292264 -208162
-365750 -855970 -358735 -533942 -707736...

output:

3
0 0 1489739
927801 0 2088555
71634 1861 1670390
43613 0 1262653
458559 0 589463
-664238 0 1371657
-401952 0 -3050331
640474 4000000 -1776313
-123704 4005451 -2779651
131641 4001737 -2755240
643826 4000000 -2695848
282580 4000000 -1745994
-114183 4000000 -2314786
628397 0 -1780469
327570 4000000 -3...

result:

ok Answer and construction are correct.

Test #99:

score: 1
Accepted
time: 13ms
memory: 11760kb

input:

1995 6 1
-397969 265139 313043 241660 636929 313697
882294 265139 313043 241660 642430 -506357
-182448 272442 313043 241660 636929 -650400
471689 276973 313043 241660 636929 99750
467519 276973 313043 241660 636929 -381455
905322 265139 313043 241660 636929 298369
151449 -734861 -686957 -758340 -363...

output:

4
0 0 0 1372499
1280263 0 5501 552445
215521 7303 0 408402
869658 0 11834 1158552
865488 0 11834 677347
1303291 0 0 1357171
549418 0 0 -3362761
212636 0 4000000 -2384733
747101 0 4007478 -2629593
1260722 7724 4015002 -3024877
144380 8015 4000000 -3291131
1199654 0 4008015 -2256025
1079602 0 4000000 ...

result:

ok Answer and construction are correct.

Test #100:

score: 1
Accepted
time: 13ms
memory: 11760kb

input:

1981 6 1
430365 539314 79312 277336 877352 -778260
-852142 545533 79312 277336 878054 791327
-275589 545533 84324 277336 877352 422506
-944236 545533 90179 277336 877352 -411475
-28950 550728 79312 277336 877352 -378505
-141840 539314 79312 277336 877352 -227291
375768 -460686 -920688 -722664 -12264...

output:

4
0 0 0 1425419
-1282507 0 6921 2995006
-705954 5012 6219 2626185
-1374601 0 17086 1792204
-459315 5195 6219 1825174
-572205 0 0 1976388
-54597 0 0 -2728740
-705006 0 4000000 -2323994
-1404276 0 4000000 -1073598
-1418322 0 4000000 -1991840
-912496 0 4006842 -1278478
-1316149 0 4010949 -1515474
-1092...

result:

ok Answer and construction are correct.

Test #101:

score: 1
Accepted
time: 8ms
memory: 11820kb

input:

1600 7 1
251019 751943 527393 292765 114617 915714 -627571
-444298 753560 527393 301993 114617 915714 -183310
792104 753560 527393 301993 114617 915714 -608074
-239610 753560 527393 308839 114617 915714 82258
880283 753560 527393 292765 114617 915714 451587
34917 758502 527393 292765 114617 915714 -...

output:

3
0 0 2225880
-695317 10845 2670141
541085 10845 2245377
-490629 17691 2935709
629264 1617 3305038
-216102 6559 2399555
248294 0 1898385
658351 0 -2610428
-943148 5000000 -1187376
-485462 5000000 -3064893
-1169142 5016428 -2507527
-831672 5008828 -2773576
-1068685 5008828 -1496464
-100684 5008828 -1...

result:

ok Answer and construction are correct.

Test #102:

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

input:

1552 7 1
457597 283171 704123 315118 881542 434284 -467457
-181021 283171 704123 322207 881542 434284 619507
630076 283171 704123 322901 887358 434284 -688843
481124 283171 704123 322901 881542 434284 571647
-574731 283171 704123 315118 881542 434284 515655
325355 292477 704123 315118 881542 434284 ...

output:

3
0 0 2608378
-638618 7089 3695342
172479 13599 2386992
23527 7783 3647482
-1032328 0 3591490
-132242 9306 2082416
102731 0 3732215
377256 0 -1248821
-950679 5000000 -2554943
-1252879 5001771 -1327750
-1179463 5001771 -1475964
-432795 5009138 -1824343
-834296 5001771 -1217096
247411 5001771 -2655448...

result:

ok Answer and construction are correct.

Test #103:

score: 1
Accepted
time: 10ms
memory: 20284kb

input:

2000 15 1
165662 -164595 69049 397468 89755 477523 -390586 -86917 -987414 786553 535313 149006 -182727 907248 -316445
716460 -164508 68854 397675 89957 477242 -390399 -86767 -987717 786442 535270 149374 -182692 907309 225536
955434 -164074 68427 397673 90253 477121 -390208 -87144 -987335 786441 5351...

output:

14
0 0 0 0 0 0 0 0 0 0 0 0 0 1448893
551162 0 0 0 0 0 0 0 0 0 0 0 0 1990874
790591 0 0 0 0 0 0 0 0 0 0 0 0 1543816
-880851 0 0 0 0 0 0 0 0 0 0 0 0 2616180
-962730 0 0 0 0 0 0 0 0 0 0 0 0 1966472
205428 0 0 0 0 0 0 0 0 0 0 0 0 1709131
-615923 0 0 0 0 0 0 0 0 0 0 0 0 2165347
-96625 0 0 0 0 0 0 0 0 0 0...

result:

ok Answer and construction are correct.

Test #104:

score: 1
Accepted
time: 12ms
memory: 18560kb

input:

2000 15 1
-690765 -617148 314920 396684 -827571 744796 -394971 585443 -3345 -127233 -931888 871697 -745551 -769546 591932
231296 -616968 314901 396489 -827295 744843 -395332 585411 -2860 -127223 -932347 871904 -745720 -769122 357408
-447602 -616765 314772 396502 -827323 745071 -395743 585363 -2373 -...

output:

15
0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1602546
922455 0 0 0 0 0 0 0 0 0 0 0 0 0 -1837070
243878 0 0 0 0 0 0 0 0 0 0 0 0 0 -2116176
-223298 0 0 0 0 0 0 0 0 0 0 0 0 0 -2170131
738582 0 0 0 0 0 0 0 0 0 0 0 0 0 -2792784
751006 0 0 0 0 0 0 0 0 0 0 0 0 0 -2934886
610326 0 0 0 0 0 0 0 0 0 0 0 0 0 -2573027
381895 ...

result:

ok Answer and construction are correct.

Test #105:

score: 1
Accepted
time: 14ms
memory: 19236kb

input:

2000 15 1
-426280 163379 -896612 -498245 201029 -862032 658592 -759654 945352 526749 569842 669834 -538375 193007 -791466
-641942 163096 -896586 -497954 200942 -862324 658836 -759652 945336 526687 570150 669869 -537933 193007 -288987
325877 163214 -896584 -498019 200916 -861934 658715 -759998 945770...

output:

3
0 0 -844880
-215531 477 -342401
752715 827 542074
120342 827 680091
198784 1632 237972
934934 1632 305419
-513428 1151 34232
-68911 477 751219
-87312 477 -906791
800072 477 91503
-224991 0 -140851
230524 0 881405
220241 0 -914156
1211591 0 102808
537827 650 -880235
240450 1035 -543040
-276091 1266...

result:

ok Answer and construction are correct.

Test #106:

score: 1
Accepted
time: 15ms
memory: 16412kb

input:

2000 15 1
-773704 846581 38417 -46145 -135572 159130 941337 -862396 -322327 54043 58934 365861 553667 -585853 -465713
212853 846702 37998 -45749 -135740 158938 941599 -862445 -322502 54183 58860 365923 553431 -585869 -580490
-1487 846935 38060 -45633 -135809 158921 941409 -862465 -322566 54306 58931...

output:

4
0 0 0 -173740
986557 0 121 -288986
772217 0 532 1214557
1084787 0 121 -584563
1002516 0 0 634317
248453 0 0 -231709
1176283 0 0 281225
396790 0 22 446104
1492174 0 790 1020713
1072465 0 2118 -454125
422602 0 2471 789192
358753 0 3305 427566
1132129 0 2719 619524
1517980 0 2574 679594
-76109 0 2574...

result:

ok Answer and construction are correct.

Test #107:

score: 1
Accepted
time: 145ms
memory: 20564kb

input:

2000 15 1
599143 -435313 -240083 -803218 698762 99698 -156966 411773 -392927 -991824 -113510 -243838 -43206 566488 -825500
-129253 -435291 -239861 -803572 698754 99936 -156868 411645 -393090 -991672 -113602 -243737 -43038 568487 -360452
-650658 -434964 -239831 -803963 698946 100073 -157090 411882 -3...

output:

13
0 0 0 0 0 0 0 0 0 0 0 0 -1870521
-728105 0 0 0 0 0 0 0 0 0 0 1964 -1405473
-1249084 0 0 0 0 0 0 0 0 0 3637 1964 -590030
-647032 0 0 0 0 0 0 0 0 2442 4204 1964 -1086291
-1473415 0 0 0 0 0 0 0 1470 2927 4734 1964 -1528271
-469359 0 0 0 0 0 0 1191 2059 2927 4734 2012 -369074
-1213528 0 0 0 0 0 291 1...

result:

ok Answer and construction are correct.

Test #108:

score: 1
Accepted
time: 141ms
memory: 17772kb

input:

2000 15 1
503384 539652 -457002 216846 132098 -910098 23703 -591314 461933 647984 -105501 -749894 660054 290171 181709
246278 539830 -456385 217474 131873 -909681 23492 -591484 464471 648481 -105578 -750002 659816 290511 -424438
655210 540572 -456283 217474 132567 -909979 23107 -588868 465097 647814...

output:

14
0 0 0 0 0 0 0 0 0 0 0 0 0 843725
-257106 0 0 0 0 0 0 0 0 0 0 0 4269 237495
151826 0 0 0 0 0 0 0 0 0 0 4058 4308 1311860
-965859 0 0 0 0 0 0 0 0 0 3234 4058 4269 1030300
394390 0 0 0 0 0 0 0 0 2373 3234 4626 3965 700909
-889269 0 0 0 0 0 0 0 2756 2645 4796 3783 5208 1231629
227526 0 0 0 0 0 0 363 ...

result:

ok Answer and construction are correct.

Subtask #7:

score: 1
Accepted

Test #109:

score: 1
Accepted
time: 185ms
memory: 74080kb

input:

2000 150 0
502255 656462 993927 -616936 408198 374967 -945122 -410186 290980 -894239 490372 -268862 -116114 948944 -537144 582299 401124 625132 -997746 -423544 -317308 -442064 304165 -544416 414951 -444806 894024 928857 -969500 328932 450438 459987 272021 -1314 656971 449233 225344 -516027 -117562 -...

output:

15

result:

ok Answer correct.

Test #110:

score: 1
Accepted
time: 29ms
memory: 32988kb

input:

150 2000 0
-777418 -961454 -220651 -939570 -961783 -493860 -996448 -821138 -662053 -177728 -641976 -156998 -913535 -951524 -154579 -237457 -848178 -589970 -678586 -312050 -695364 -427771 -10764 -23594 -594462 -87037 -486655 -6199 -178815 -20076 -516096 -603262 -587304 -995893 -733894 -853965 -853158...

output:

10

result:

ok Answer correct.

Test #111:

score: 1
Accepted
time: 190ms
memory: 72116kb

input:

2000 150 0
-189528 -276586 -135266 -840070 -834653 -611978 -674624 -402177 -316263 -935170 -349197 -538806 -984484 -11161 -943269 -873129 -462433 -240474 -957803 -388280 -907112 -531791 -413691 -146959 -730077 -27410 -904637 -722707 -783032 -353653 -823853 -296344 -795391 -996371 -436089 -928324 -84...

output:

15

result:

ok Answer correct.

Test #112:

score: 1
Accepted
time: 1028ms
memory: 54008kb

input:

547 547 0
-616501 19508 107671 -847919 -111517 -97735 847541 -131562 -862864 503647 412303 -862075 -76792 903571 -676770 -17351 758980 943529 -104315 918348 640850 517848 -783939 762459 -82784 -295978 655481 796408 70300 -685818 -134669 -114680 252592 919883 506586 453239 884533 -564883 436599 31506...

output:

384

result:

ok Answer correct.

Test #113:

score: 1
Accepted
time: 792ms
memory: 76208kb

input:

2000 150 0
780357 382481 -87594 -613276 -979496 549935 34167 -638696 -915354 936318 -43050 -802366 -854044 -134715 122456 98103 362662 -254760 -508775 544310 -725153 -439335 116292 472301 309840 268325 -581732 572413 -222662 530151 -944267 281275 -723909 -434438 645965 268787 892017 -838464 -760558 ...

output:

138

result:

ok Answer correct.

Test #114:

score: 1
Accepted
time: 1140ms
memory: 55760kb

input:

1000 300 0
-526448 646291 507923 682948 772889 129248 192676 -932112 -350090 -249623 -263665 136429 167616 164043 -781861 -924587 599347 -15875 266378 -456317 54900 -316032 -223577 -225581 46181 -182835 -907453 -42906 672167 -869836 -929583 454759 -211217 500053 -862160 291037 524324 -573690 305901 ...

output:

262

result:

ok Answer correct.

Test #115:

score: 1
Accepted
time: 8ms
memory: 13552kb

input:

1995 6 0
826548 124811 220559 163932 512579 885160
-839540 124811 220559 169004 512579 -314567
-312579 124811 220559 174487 512579 -120104
-560491 132253 220559 163932 512579 648020
774955 132253 220559 163932 512579 528777
387569 124811 220559 163932 512579 991034
-563459 -875189 -779441 -836068 -4...

output:

4

result:

ok Answer correct.

Test #116:

score: 1
Accepted
time: 8ms
memory: 14648kb

input:

1981 6 0
-871507 -311006 -310373 -139987 -871615 -616471
-667782 688994 689627 860013 128385 886160
-167010 688994 689627 860013 133673 128105
-37800 688994 689627 880708 133397 -520454
578300 688994 689627 871376 133397 -606714
136881 690773 689627 866634 133397 524875
-619943 688994 689627 860013 ...

output:

4

result:

ok Answer correct.

Test #117:

score: 1
Accepted
time: 1622ms
memory: 49624kb

input:

547 547 0
431640 -858399 -507354 -476380 -684758 -722452 -984954 -965103 -681845 -879575 -675076 -715796 -689680 -580579 -952892 -881873 -360698 -696166 -473136 -619074 -791890 -384524 -793053 -790524 -290583 -773330 -846713 -921770 -632704 -739051 -897554 -488379 -825518 -560707 -724852 -907362 -31...

output:

546

result:

ok Answer correct.

Test #118:

score: 1
Accepted
time: 1469ms
memory: 46680kb

input:

547 547 0
431640 -858399 -507354 -476380 -684758 -722452 -984954 -965103 -681845 -879575 -675076 -715796 -689680 -580579 -952892 -881873 -360698 -696166 -473136 -619074 -791890 -384524 -793053 -790524 -290583 -773330 -846713 -921770 -632704 -739051 -897554 -488379 -825518 -560707 -724852 -907362 -31...

output:

547

result:

ok Answer correct.

Test #119:

score: 1
Accepted
time: 339ms
memory: 59824kb

input:

2000 150 0
42772 761057 -108286 -273330 -327858 680012 329678 809050 339942 202071 477911 548337 -835257 703256 -865241 -194398 878313 545742 25600 -851204 -192357 563857 -262268 -513158 -464847 -728645 328345 -514596 -834908 258854 12045 429270 118875 364276 587193 -471121 -797531 562527 -776649 -3...

output:

72

result:

ok Answer correct.

Test #120:

score: 1
Accepted
time: 348ms
memory: 75768kb

input:

2000 150 0
444326 -6531 -324705 -455070 887148 -99955 -772813 -887209 310772 -284588 661794 96239 -556394 459582 -894577 -521425 509991 913131 233293 313895 311179 329914 -569802 -850210 -104658 -33011 490718 -813827 -670679 172238 -517807 173344 -841930 -170322 -627695 -595135 -477599 51339 152037 ...

output:

74

result:

ok Answer correct.

Test #121:

score: 1
Accepted
time: 1553ms
memory: 64152kb

input:

2000 150 0
-235255 -532586 137939 -609672 185169 63865 -939720 -15795 77332 -699598 245256 -694616 -710691 -369058 -436743 59458 -375854 -987868 -11848 -97608 -24943 -866042 -806926 -113100 -867579 -392649 141738 -574512 -288852 -310037 -79133 -528826 -942025 -349698 -323770 -394567 -353994 -412513 ...

output:

149

result:

ok Answer correct.

Test #122:

score: 1
Accepted
time: 1419ms
memory: 64068kb

input:

2000 150 0
-696412 181682 -196346 -742918 -897017 234676 -158161 -606993 -367275 -718634 -708177 -913107 12293 -251170 -871123 -14344 -783728 -447190 -327815 -238226 -354866 -839200 -208979 -820282 -679117 -308793 -232468 -968418 -400924 -58811 -99713 93779 -371245 -345529 -470385 -798589 -270226 -3...

output:

150

result:

ok Answer correct.

Test #123:

score: 1
Accepted
time: 73ms
memory: 57112kb

input:

2000 109 0
308711 -824090 14069 -367845 -123932 -745304 503424 -608160 644519 547336 158969 -820817 -947945 -678935 -256267 -789751 -732234 747312 574218 -3849 -857680 -551220 -130040 646208 350795 -38326 -568696 -760880 502995 -142966 -692124 719927 192157 260249 -530209 -78920 -16473 -997672 48450...

output:

33

result:

ok Answer correct.

Test #124:

score: 1
Accepted
time: 57ms
memory: 49100kb

input:

2000 115 0
-922482 704011 -868799 900849 -248422 309458 27072 -467651 567527 25416 657165 908542 142400 985613 -60818 869698 -651338 -367339 111732 574552 -162346 -556363 279508 935050 637436 431396 -339904 -265727 879204 -514009 264940 -150411 29547 -727506 -352624 -561967 -670734 781587 -339861 39...

output:

34

result:

ok Answer correct.

Test #125:

score: 1
Accepted
time: 667ms
memory: 57600kb

input:

1000 299 0
-11620 -674340 417382 796257 -240402 750193 35895 -215758 -478699 -684413 -486530 318950 -494037 -24706 199252 -963032 -142195 240775 -337464 621616 438630 546271 -929148 -693300 -774027 -292015 -334735 -33316 -34883 -870715 -682195 84042 428933 -211958 -565501 -149527 -528943 -543624 494...

output:

133

result:

ok Answer correct.

Test #126:

score: 1
Accepted
time: 690ms
memory: 63808kb

input:

1000 298 0
12126 898 -411175 6592 -430102 652760 -446996 -98213 -860099 904320 424549 821125 -801065 -266670 -748542 588938 -549477 -308144 38868 128633 853922 -467125 122975 350941 239863 -933048 -720452 607919 619341 367360 543552 -368365 -624493 -648044 -186411 524340 -687138 125002 -148104 73823...

output:

135

result:

ok Answer correct.

Test #127:

score: 1
Accepted
time: 1232ms
memory: 66408kb

input:

1000 300 0
-224562 817639 264860 303165 459584 -586615 272971 -152480 -954235 805217 397020 -238696 763990 -549483 733508 -358059 -198944 747068 604924 336497 -398307 -827640 -916311 524806 -423206 299187 647484 -614719 -480532 -466201 -2166 245694 264353 -218872 -293896 47033 -964902 -120966 -24564...

output:

198

result:

ok Answer correct.

Test #128:

score: 1
Accepted
time: 1191ms
memory: 54028kb

input:

1000 299 0
558264 198528 -412502 -833692 -137968 514292 478282 -222163 3329 -447204 -927948 126356 194995 -607703 -562494 533045 -885117 -859525 -109953 361917 -839493 -598034 164968 -917900 -202123 -159706 -605418 -532542 99095 -109696 341199 -675208 -418236 -974353 -683955 -249751 430918 -927532 -...

output:

199

result:

ok Answer correct.

Subtask #8:

score: 0
Time Limit Exceeded

Test #129:

score: 1
Accepted
time: 2892ms
memory: 62312kb

input:

16383 12 1
-588354 -556402 -890033 754757 -83344 -896139 -856270 345207 92213 -491349 156352 454376
-876941 -343645 692978 -547249 667486 871369 778990 638343 782111 61653 -422802 967533
474923 -942557 15693 893397 -645229 72717 136483 -776943 -80204 236938 -86558 132409
936762 -950374 613882 -97071...

output:

9
0 0 0 0 0 0 0 0 -2558986
-288587 0 0 0 0 0 0 6183396 -2624983
1063277 0 0 0 0 0 164449 1893486 -3690143
1525116 0 0 0 0 590372 0 1649361 -4368132
422091 0 0 0 1241524 0 2300169 1529188 -5832460
1292646 0 0 0 0 1241524 195496 2224204 -5358146
-390636 0 0 0 0 1489973 1953110 1619742 -6842869
-347144...

result:

ok Answer and construction are correct.

Test #130:

score: 1
Accepted
time: 2893ms
memory: 62196kb

input:

16385 12 1
-480205 -684991 -320636 -372887 -458315 -1553 -654415 -669683 -408658 -460033 -434327 -90206
-344345 -641782 -702889 -195092 -936989 -880480 -332532 -658230 -326975 -938453 -455125 -931530
-847269 -288344 -797434 -289973 -939637 -213267 -473854 -51472 -733138 -890795 -244608 -150117
-2847...

output:

9
0 0 0 0 0 0 0 0 -5035909
135860 0 0 0 0 0 0 43209 -7523491
-367064 0 0 0 0 0 0 1337222 -6890066
195427 0 0 0 0 0 891345 776510 -6830955
281606 0 0 0 0 0 196173 577453 -7830298
39013 0 0 0 0 598535 0 241555 -7891458
100967 0 0 0 0 0 2368367 340658 -8244527
437039 0 0 0 0 0 3881882 136290 -8090960
1...

result:

ok Answer and construction are correct.

Test #131:

score: 1
Accepted
time: 16ms
memory: 23324kb

input:

20 10000 1
-589911 -92562 -534601 -496120 -216049 -272531 -562492 -346989 -169236 -840169 -82630 -130144 -445123 -805353 -737677 -267755 -621864 -430045 -155435 -311038 -175205 -525876 -160857 -589545 -22962 -891829 -755077 -649311 -641006 -348235 -689486 -891870 -380372 -907327 -87581 -454944 -7333...

output:

7
0 0 0 0 0 0 -3831975581
-302663 0 0 0 0 1370013503 -3834649561
1188026 0 0 0 8773171 1340474913 -3839476806
4192365 0 0 49793 40591791 1313985459 -3850297580
5099246 0 0 984605 52091374 1307710491 -3867515775
6245800 0 0 40200144 7606431 1375535650 -3869620554
8585221 0 15034175 0 49796211 1349066...

result:

ok Answer and construction are correct.

Test #132:

score: 1
Accepted
time: 586ms
memory: 42328kb

input:

447 447 1
705426 -614398 553766 836101 -285988 821517 332749 847938 -550845 287834 -590030 238598 305364 761617 468786 -838101 60658 167691 -77755 -129688 894052 -886970 -68286 295611 -774590 882904 176726 -140642 138144 101913 927882 607281 500323 753794 570267 96291 -576574 -642751 816782 -855853 ...

output:

320
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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 Answer and construction are correct.

Test #133:

score: 1
Accepted
time: 115ms
memory: 58856kb

input:

5000 40 1
43790 312732 240963 -933083 850709 824573 -758517 -232147 223175 145469 506845 736938 -319776 79910 905964 130684 289390 -6224 -565059 871225 -58732 235657 222461 354606 -875747 922191 207503 -563457 -675329 322471 -688895 -595950 691269 865908 713749 -874007 -732437 651947 -310973 -283140...

output:

34
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2876656
-489564 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3510293
85387 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2947165
-545245 0 0 0 0 0 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 Answer and construction are correct.

Test #134:

score: 1
Accepted
time: 122ms
memory: 19996kb

input:

6720 6 1
-661106 -342635 -924946 -260624 -42193 -592794
381798 657365 75054 739376 957807 98908
308616 657365 75054 739376 965165 585251
-154164 657365 75054 751880 957807 -280451
-295809 657365 79435 746127 957807 -479421
249309 657365 79435 746127 957807 -631725
915624 657365 75054 739376 957807 -...

output:

5
0 0 0 0 -2824298
1042904 0 0 4000000 -2132596
969722 0 0 4007358 -1646253
506942 0 12504 4000000 -2511955
365297 4381 0 4006751 -2710925
910415 0 0 4011132 -2863229
1576730 0 0 4000000 -2349001
-191451 0 0 0 -1477107
769800 0 0 4000000 -3047663
551975 0 0 4009145 -1830580
1232744 0 2872 4007658 -1...

result:

ok Answer and construction are correct.

Test #135:

score: 1
Accepted
time: 118ms
memory: 21380kb

input:

6727 6 1
-471060 -28473 -999339 -491224 -259821 703612
-683624 971527 661 508776 740179 -675000
-43900 971527 661 508776 749842 -986369
-217551 971527 661 516613 747110 609327
-287579 971527 661 514428 741916 863236
-148478 975382 661 512051 740179 -374044
42635 971527 661 508776 740179 -289871
-459...

output:

6
0 0 0 0 0 -1546305
-212564 0 0 0 4000000 -2924917
427160 0 0 0 4009663 -3236286
253509 0 0 7837 4006931 -1640590
183481 0 0 5652 4001737 -1386681
322582 0 3855 3275 4000000 -2623961
513695 0 0 0 4000000 -2539788
11775 0 0 0 0 -2487552
849215 0 0 0 4000000 -2006422
974887 0 0 0 4003749 -2235990
-80...

result:

ok Answer and construction are correct.

Test #136:

score: 1
Accepted
time: 276ms
memory: 42104kb

input:

447 447 1
669412 557504 913037 908346 962841 233168 356524 681977 253384 700392 380074 838286 -326601 -142271 -909316 -865743 -409897 -128802 -381373 -202302 -883735 -139244 -344254 -498318 -498482 892930 -153725 -9710 770004 -845034 -960119 206984 -422569 617070 -145424 45589 17330 -281478 -8016 -3...

output:

180
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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 Answer and construction are correct.

Test #137:

score: 1
Accepted
time: 285ms
memory: 42276kb

input:

447 447 1
669412 557504 913037 908346 962841 233168 356524 681977 253384 700392 380074 838286 -326601 -142271 -909316 -865743 -409897 -128802 -381373 -202302 -883735 -139244 -344254 -498318 -498482 892930 -153725 -9710 770004 -845034 -960119 206984 -422569 617070 -145424 45589 17330 -281478 -8016 -3...

output:

182
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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 Answer and construction are correct.

Test #138:

score: 1
Accepted
time: 563ms
memory: 58828kb

input:

2500 80 1
694365 -17820 760508 -853776 457745 -989926 930399 -865360 -602678 701533 920817 -615473 301017 336306 315312 147723 756927 -784861 -842280 -504388 233427 685401 -815415 411718 251511 205145 -365365 62031 486049 635380 86038 536367 -198080 -788618 806661 -494832 773945 768726 -785231 85309...

output:

56
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2624113
-1451174 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 9011 1947077
-37492 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

result:

ok Answer and construction are correct.

Test #139:

score: 1
Accepted
time: 567ms
memory: 56604kb

input:

2500 80 1
-749212 922640 -540317 915027 697816 92173 -912146 110926 -979387 -446683 -851783 -294627 -703072 283929 191972 -39561 41213 -377257 49387 -239924 299773 -475866 -381331 -880395 85431 -345201 564222 -772237 196010 -473986 11843 -192334 -375952 -538253 644841 -345150 -207745 792789 553544 -...

output:

58
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -10928077
1285223 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 9011 -10328038
797253 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

result:

ok Answer and construction are correct.

Test #140:

score: 1
Accepted
time: 137ms
memory: 59112kb

input:

5000 40 1
-54985 200760 -728310 -738919 -335815 485802 -671125 -262208 60318 -978391 -931408 302282 743538 -749052 -860315 -850777 -420655 8644 -884854 -800875 182594 535886 -616624 -732884 -321017 -322542 -346530 -949937 801522 505735 789834 -13870 171592 -487050 326830 46685 -39685 161536 -763028 ...

output:

30
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -7945682
-411600 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 39 -8061671
282590 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 375 39 -7757242
394506 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 375 39 -7676121
-83346...

result:

ok Answer and construction are correct.

Test #141:

score: 1
Accepted
time: 149ms
memory: 58924kb

input:

5000 40 1
959674 599797 239781 -574660 -970671 -504448 138728 532999 845838 284192 -265906 -655604 496210 -128350 -258002 2571 -940769 -206335 714050 759907 452223 -11308 -840541 -633277 112388 542567 -233304 299798 -956267 -656107 -962674 311592 -221026 376746 264678 -317784 -678741 897392 -772839 ...

output:

31
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1431774
-1340748 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 39 -1688953
-1093744 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 375 39 -2299296
-444432 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 375 39 -13...

result:

ok Answer and construction are correct.

Test #142:

score: 1
Accepted
time: 2411ms
memory: 61564kb

input:

16384 12 1
822639 413876 -977799 148141 696290 -928473 -680662 -846893 -800376 -943818 -987342 256208
-941204 413884 -977800 148170 696278 -928470 -680690 -846896 -800337 -943849 -986901 979008
-474312 413896 -977813 148141 696303 -928469 -680697 -846864 -800356 -943427 -986922 967128
210502 413903 ...

output:

5
0 0 0 0 -3828209
-1763802 0 0 404 -3105409
-1296879 0 393 383 -3117289
-612011 0 0 1448 -4518894
-677348 0 0 2821 -4135881
-867193 0 0 2962 -4143936
-660621 0 569 3030 -4144042
-1564814 134 569 3414 -3891170
-875811 308 688 3414 -4058325
82266 838 1486 3414 -4285305
-862237 1765 1710 2373 -4119652...

result:

ok Answer and construction are correct.

Test #143:

score: 1
Accepted
time: 2344ms
memory: 61916kb

input:

16384 12 1
822639 413876 -977799 148141 696290 -928473 -680662 -846893 -800376 -943818 -987342 256208
-941204 413884 -977800 148170 696278 -928470 -680690 -846896 -800337 -943849 -986901 979008
-474312 413896 -977813 148141 696303 -928469 -680697 -846864 -800356 -943427 -986922 967128
210502 413903 ...

output:

6
0 0 0 0 0 -3828209
-1763802 0 0 0 404 -3105409
-1296879 0 0 393 383 -3117289
-612011 0 0 0 1448 -4518894
-677348 0 0 0 2821 -4135881
-867193 0 0 0 2962 -4143936
-660621 0 0 569 3030 -4144042
-1564814 0 134 569 3414 -3891170
-875811 0 308 688 3414 -4058325
82266 0 838 1486 3414 -4285305
-862237 0 1...

result:

ok Answer and construction are correct.

Test #144:

score: 0
Time Limit Exceeded

input:

20000 10 1
879035 -954501 -809255 -711278 -110547 -38840 -701426 569729 -739169 579962
985202 -954486 -808466 -710398 -110574 -38850 -701400 569690 -739169 -291978
-157270 -954116 -808414 -710844 -110128 -38860 -701395 569676 -739162 -912542
29084 -953135 -808425 -710468 -110128 -38879 -701377 56967...

output:


result:


Subtask #9:

score: 0
Time Limit Exceeded

Test #150:

score: 1
Accepted
time: 22ms
memory: 38156kb

input:

10 30000 0
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 1...

output:

2

result:

ok Answer correct.

Test #151:

score: 1
Accepted
time: 23ms
memory: 38340kb

input:

10 30000 0
-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:

2

result:

ok Answer correct.

Test #152:

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

input:

2 30000 0
-903916 -563037 -752732 381147 532482 -575236 414123 237750 999186 -105662 776664 452077 148555 79111 -219494 -243665 102325 378227 -631862 -178999 -116098 -335886 -309083 737918 157116 -877437 613118 -168345 -307531 180080 -599701 570114 -307725 109750 299323 754274 -3661 -170556 144167 7...

output:

2

result:

ok Answer correct.

Test #153:

score: 1
Accepted
time: 21ms
memory: 22036kb

input:

10 30000 0
-340759 956485 -104705 -977708 -547472 -804300 30634 466529 -636304 3541 559026 131123 -817185 -897029 -973699 728782 -807622 -514856 -192574 426272 954214 -249095 170522 135827 -294695 -287769 510426 366180 -682604 2573 728715 903147 -525794 556987 985261 962330 -422940 -289842 957614 -1...

output:

5

result:

ok Answer correct.

Test #154:

score: 1
Accepted
time: 50ms
memory: 53464kb

input:

547 548 0
-176205 378779 81612 -320548 359253 439421 393545 870172 -811372 -362121 -223181 -59681 601333 340578 -695130 -175211 440936 -343984 -526737 918152 -89053 101232 429566 913834 -592914 596496 471063 124115 517210 457464 -318297 239208 -940785 327803 -369480 215353 -945914 -435734 -751170 25...

output:

12

result:

ok Answer correct.

Test #155:

score: 0
Time Limit Exceeded

input:

30000 10 0
972268 41881 56956 664830 -870100 983888 468906 729378 867112 908148
-318412 93138 714372 -360120 -412126 -809251 -264307 494538 -378001 290473
-823427 866058 50337 924978 812785 84377 818443 -490801 834260 940424
-482848 -937284 144571 -387297 -975302 806522 796548 388925 -696748 -558782...

output:


result:


Subtask #10:

score: 0
Time Limit Exceeded

Test #186:

score: 1
Accepted
time: 15ms
memory: 42020kb

input:

10 30000 1
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 1...

output:

2
0 30000000000
0 30000000000
0 30000000000
0 30000000000
0 30000000000
0 30000000000
0 30000000000
0 30000000000
0 30000000000
0 30000000000

result:

ok Answer and construction are correct.

Test #187:

score: 1
Accepted
time: 16ms
memory: 38204kb

input:

10 30000 1
-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:

2
0 -30000000000
0 -30000000000
0 -30000000000
0 -30000000000
0 -30000000000
0 -30000000000
0 -30000000000
0 -30000000000
0 -30000000000
0 -30000000000

result:

ok Answer and construction are correct.

Test #188:

score: 1
Accepted
time: 6ms
memory: 9332kb

input:

2 30000 1
-903916 -563037 -752732 381147 532482 -575236 414123 237750 999186 -105662 776664 452077 148555 79111 -219494 -243665 102325 378227 -631862 -178999 -116098 -335886 -309083 737918 157116 -877437 613118 -168345 -307531 180080 -599701 570114 -307725 109750 299323 754274 -3661 -170556 144167 7...

output:

2
0 -175478161
232048070 -189372299

result:

ok Answer and construction are correct.

Test #189:

score: 1
Accepted
time: 16ms
memory: 19756kb

input:

10 30000 1
-340759 956485 -104705 -977708 -547472 -804300 30634 466529 -636304 3541 559026 131123 -817185 -897029 -973699 728782 -807622 -514856 -192574 426272 954214 -249095 170522 135827 -294695 -287769 510426 366180 -682604 2573 728715 903147 -525794 556987 985261 962330 -422940 -289842 957614 -1...

output:

5
0 0 0 0 -185217245
19396647 0 0 282670129 -225874206
24901525 0 0 129407107 -282828994
152997438 0 47339069 91297894 -293933071
193880792 69906269 0 133028899 -309959340
256266375 0 167483792 77305788 -310477070
269807049 0 30595166 54385229 -357639444
336615107 0 81879804 0 -403677923
368148994 9...

result:

ok Answer and construction are correct.

Test #190:

score: 1
Accepted
time: 61ms
memory: 53432kb

input:

547 548 1
-176205 378779 81612 -320548 359253 439421 393545 870172 -811372 -362121 -223181 -59681 601333 340578 -695130 -175211 440936 -343984 -526737 918152 -89053 101232 429566 913834 -592914 596496 471063 124115 517210 457464 -318297 239208 -940785 327803 -369480 215353 -945914 -435734 -751170 25...

output:

12
0 0 0 0 0 0 0 0 0 0 0 -11668793
-608522 0 0 0 0 0 0 0 0 0 30612582 -14138381
292440 0 0 0 0 0 0 0 0 1664940 18715447 -22709776
36430 0 0 0 0 0 0 0 0 12910920 20626756 -24735486
843704 0 0 0 0 0 0 0 7889843 18927337 12884430 -40073918
1038488 0 0 0 0 0 0 0 13241335 6428667 16970882 -40008527
65049...

result:

ok Answer and construction are correct.

Test #191:

score: 0
Time Limit Exceeded

input:

30000 10 1
972268 41881 56956 664830 -870100 983888 468906 729378 867112 908148
-318412 93138 714372 -360120 -412126 -809251 -264307 494538 -378001 290473
-823427 866058 50337 924978 812785 84377 818443 -490801 834260 940424
-482848 -937284 144571 -387297 -975302 806522 796548 388925 -696748 -558782...

output:


result: