QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#508545#508. Nice sequenceabcdefghijkl100 ✓979ms32228kbC++201.4kb2024-08-07 16:55:132024-08-07 16:55:14

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 6
Accepted

Test #1:

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

input:

3
3 1
2 3
1 1

output:

2
1 1
3
2 -3 2
0

result:

ok Ok

Test #2:

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

input:

10
1 1
1 2
1 3
1 4
1 5
6 1
7 1
8 1
9 1
100 1

output:

0
1
-1
2
-1 -1
3
-1 -1 -1
4
-1 -1 -1 -1
5
1 1 1 1 1
6
1 1 1 1 1 1
7
1 1 1 1 1 1 1
8
1 1 1 1 1 1 1 1
99
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

result:

ok Ok

Test #3:

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

input:

10
60 1
70 1
1 60
1 70
1 50
39 1
41 1
23 1
1 99
87 3

output:

59
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
69
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
59
-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1...

result:

ok Ok

Test #4:

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

input:

10
94 94
27 54
31 31
28 28
76 76
35 35
89 89
57 57
90 18
13 39

output:

93
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
53
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -53 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
...

result:

ok Ok

Test #5:

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

input:

10
67 67
64 64
82 82
16 96
74 74
37 37
90 90
59 59
66 66
14 7

output:

66
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
63
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
81
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok Ok

Test #6:

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

input:

10
49 98
15 90
14 56
54 18
67 67
50 100
90 90
85 85
94 94
65 65

output:

97
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -97 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
89
1 1 1 1 1 1 1 1 1 1 1 1 1 1 -29 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -29 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -29 1 ...

result:

ok Ok

Test #7:

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

input:

10
19 19
77 77
85 17
4 4
80 80
98 98
94 94
100 100
88 22
77 77

output:

18
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
76
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
84
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok Ok

Test #8:

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

input:

10
36 36
21 84
51 51
72 24
88 44
29 29
20 20
67 67
82 82
92 92

output:

35
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
83
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -41 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -41 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -41 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
50
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok Ok

Test #9:

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

input:

10
4 12
95 95
59 59
48 48
23 23
76 76
35 5
97 97
89 89
58 58

output:

11
1 1 1 -7 1 1 1 -7 1 1 1
94
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
58
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok Ok

Test #10:

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

input:

10
74 74
71 71
95 95
90 15
35 35
88 88
58 58
49 98
84 84
67 67

output:

73
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
70
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
94
1 1 1...

result:

ok Ok

Test #11:

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

input:

10
78 78
59 59
40 40
49 49
74 37
2 56
77 77
33 33
93 93
11 11

output:

77
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
58
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
39
1 1 1 1 1 1 1 1 1 1 1...

result:

ok Ok

Test #12:

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

input:

10
52 52
20 100
95 95
91 91
41 82
50 50
89 89
78 78
80 80
44 22

output:

51
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
99
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -39 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -39 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -39 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -39 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok Ok

Test #13:

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

input:

10
69 69
36 36
48 48
32 32
55 55
69 69
80 80
75 75
71 71
62 62

output:

68
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
35
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
47
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok Ok

Subtask #2:

score: 9
Accepted

Test #14:

score: 9
Accepted
time: 1ms
memory: 3612kb

input:

10
2 2
3 2
4 2
5 2
2 6
2 7
2 8
9 2
10 2
2 11

output:

1
1
3
-2 3 -2
3
1 1 1
5
-3 4 -3 4 -3
5
1 -3 1 -3 1
7
4 -5 4 -5 4 -5 4
7
1 -3 1 -3 1 -3 1
9
-5 6 -5 6 -5 6 -5 6 -5
9
1 1 1 1 1 1 1 1 1
11
6 -7 6 -7 6 -7 6 -7 6 -7 6

result:

ok Ok

Test #15:

score: 9
Accepted
time: 1ms
memory: 3568kb

input:

10
12 2
2 13
14 2
2 15
2 16
17 2
18 2
19 2
20 2
21 2

output:

11
1 1 1 1 1 1 1 1 1 1 1
13
7 -8 7 -8 7 -8 7 -8 7 -8 7 -8 7
13
1 1 1 1 1 1 1 1 1 1 1 1 1
15
8 -9 8 -9 8 -9 8 -9 8 -9 8 -9 8 -9 8
15
1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1
17
-9 10 -9 10 -9 10 -9 10 -9 10 -9 10 -9 10 -9 10 -9
17
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
19
-10 11 -10 11 -10 11 -10 11 -10 11 -1...

result:

ok Ok

Test #16:

score: 9
Accepted
time: 1ms
memory: 3544kb

input:

10
2 22
2 23
2 24
2 25
26 2
2 27
28 2
2 29
30 2
31 2

output:

21
1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1
23
12 -13 12 -13 12 -13 12 -13 12 -13 12 -13 12 -13 12 -13 12 -13 12 -13 12 -13 12
23
1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1
25
13 -14 13 -14 13 -14 13 -14 13 -14 13 -14 13 -14 13 -14 13 -14 13 -14 13 -14 13 -14 13
25
1 1 1 1 1...

result:

ok Ok

Test #17:

score: 9
Accepted
time: 1ms
memory: 5584kb

input:

10
32 2
2 33
34 2
35 2
2 36
2 37
2 38
39 2
40 2
41 2

output:

31
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
33
17 -18 17 -18 17 -18 17 -18 17 -18 17 -18 17 -18 17 -18 17 -18 17 -18 17 -18 17 -18 17 -18 17 -18 17 -18 17 -18 17
33
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
35
-18 19 -18 19 -18 19 -18 19 -18 19 -18 19 -18...

result:

ok Ok

Test #18:

score: 9
Accepted
time: 2ms
memory: 5840kb

input:

10
2 42
43 2
2 44
45 2
46 2
2 47
48 2
2 49
50 2
2 51

output:

41
1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1
43
-22 23 -22 23 -22 23 -22 23 -22 23 -22 23 -22 23 -22 23 -22 23 -22 23 -22 23 -22 23 -22 23 -22 23 -22 23 -22 23 -22 23 -22 23 -22 23 -22 23 -22 23 -22
43
1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -...

result:

ok Ok

Test #19:

score: 9
Accepted
time: 2ms
memory: 3756kb

input:

10
2 1727
1728 2
1729 2
1730 2
1731 2
1732 2
2 1733
2 1734
2 1735
2 1736

output:

1727
864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -86...

result:

ok Ok

Test #20:

score: 9
Accepted
time: 6ms
memory: 6284kb

input:

10
2 8495
2 8496
2 8497
2 8498
8499 2
8500 2
2 8501
8502 2
8503 2
2 8504

output:

8495
4248 -4249 4248 -4249 4248 -4249 4248 -4249 4248 -4249 4248 -4249 4248 -4249 4248 -4249 4248 -4249 4248 -4249 4248 -4249 4248 -4249 4248 -4249 4248 -4249 4248 -4249 4248 -4249 4248 -4249 4248 -4249 4248 -4249 4248 -4249 4248 -4249 4248 -4249 4248 -4249 4248 -4249 4248 -4249 4248 -4249 4248 -424...

result:

ok Ok

Test #21:

score: 9
Accepted
time: 0ms
memory: 5920kb

input:

10
2 3989
2 3990
2 3991
2 3992
2 3993
3994 2
3995 2
3996 2
2 3997
2 3998

output:

3989
1995 -1996 1995 -1996 1995 -1996 1995 -1996 1995 -1996 1995 -1996 1995 -1996 1995 -1996 1995 -1996 1995 -1996 1995 -1996 1995 -1996 1995 -1996 1995 -1996 1995 -1996 1995 -1996 1995 -1996 1995 -1996 1995 -1996 1995 -1996 1995 -1996 1995 -1996 1995 -1996 1995 -1996 1995 -1996 1995 -1996 1995 -199...

result:

ok Ok

Test #22:

score: 9
Accepted
time: 0ms
memory: 6376kb

input:

10
9991 2
2 9992
2 9993
9994 2
9995 2
2 9996
2 9997
9998 2
9999 2
10000 2

output:

9991
-4996 4997 -4996 4997 -4996 4997 -4996 4997 -4996 4997 -4996 4997 -4996 4997 -4996 4997 -4996 4997 -4996 4997 -4996 4997 -4996 4997 -4996 4997 -4996 4997 -4996 4997 -4996 4997 -4996 4997 -4996 4997 -4996 4997 -4996 4997 -4996 4997 -4996 4997 -4996 4997 -4996 4997 -4996 4997 -4996 4997 -4996 499...

result:

ok Ok

Test #23:

score: 9
Accepted
time: 4ms
memory: 5984kb

input:

10
2 5682
5683 2
5684 2
2 5685
2 5686
5687 2
2 5688
2 5689
2 5690
2 5691

output:

5681
1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 1 -3 ...

result:

ok Ok

Subtask #3:

score: 14
Accepted

Test #24:

score: 14
Accepted
time: 2ms
memory: 5812kb

input:

10
7 1
1 5
1 1
10 1
1 4
3 1
1 6
1 2
1 9
8 1

output:

6
1 1 1 1 1 1
4
-1 -1 -1 -1
0
9
1 1 1 1 1 1 1 1 1
3
-1 -1 -1
2
1 1
5
-1 -1 -1 -1 -1
1
-1
8
-1 -1 -1 -1 -1 -1 -1 -1
7
1 1 1 1 1 1 1

result:

ok Ok

Test #25:

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

input:

10
6 2
2 4
2 2
2 5
3 2
7 2
2 10
2 1
2 8
2 9

output:

5
1 1 1 1 1
3
1 -3 1
1
1
5
3 -4 3 -4 3
3
-2 3 -2
7
-4 5 -4 5 -4 5 -4
9
1 -3 1 -3 1 -3 1 -3 1
1
1
7
1 -3 1 -3 1 -3 1
9
5 -6 5 -6 5 -6 5 -6 5

result:

ok Ok

Test #26:

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

input:

10
3 8
10 3
3 3
9 3
3 7
3 4
3 6
3 1
3 5
3 2

output:

9
-4 7 -4 -4 7 -4 -4 7 -4
11
-4 -4 9 -4 -4 9 -4 -4 9 -4 -4
2
1 1
8
1 1 1 1 1 1 1 1
8
3 3 -7 3 3 -7 3 3
5
2 2 -5 2 2
5
1 1 -5 1 1
2
1 1
6
-3 5 -3 -3 5 -3
3
-2 3 -2

result:

ok Ok

Test #27:

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

input:

10
1 4
8 4
9 4
7 4
4 6
2 4
4 4
4 3
4 10
5 4

output:

3
-1 -1 -1
7
1 1 1 1 1 1 1
11
-3 -3 -3 10 -3 -3 -3 10 -3 -3 -3
9
3 3 -8 3 3 3 -8 3 3
7
1 3 1 -7 1 3 1
3
1 -3 1
3
1 1 1
5
-2 -2 5 -2 -2
11
1 5 1 -9 1 5 1 -9 1 5 1
7
-2 -2 -2 7 -2 -2 -2

result:

ok Ok

Test #28:

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

input:

10
5 5
4 5
5 2
5 9
5 3
5 6
8 5
5 7
1 5
10 5

output:

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

result:

ok Ok

Test #29:

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

input:

10
1 6
6 9
10 6
4 6
2 6
6 5
7 6
3 6
6 6
6 8

output:

5
-1 -1 -1 -1 -1
11
1 1 4 1 1 -11 1 1 4 1 1
13
1 5 1 -11 1 5 1 5 1 -11 1 5 1
7
1 3 1 -7 1 3 1
5
1 -3 1 -3 1
9
-2 -2 -2 -2 9 -2 -2 -2 -2
11
-2 -2 -2 -2 -2 11 -2 -2 -2 -2 -2
5
1 1 -5 1 1
5
1 1 1 1 1
11
1 3 1 3 1 -11 1 3 1 3 1

result:

ok Ok

Test #30:

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

input:

10
5 7
4 7
7 8
7 7
1 7
7 9
7 2
3 7
10 7
7 6

output:

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

result:

ok Ok

Test #31:

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

input:

10
8 2
8 8
8 10
8 6
4 8
1 8
8 9
3 8
8 5
8 7

output:

7
1 1 1 1 1 1 1
7
1 1 1 1 1 1 1
15
1 3 1 3 1 3 1 -15 1 3 1 3 1 3 1
11
1 -5 1 -5 1 9 1 -5 1 -5 1
7
1 1 1 -7 1 1 1
7
-1 -1 -1 -1 -1 -1 -1
15
2 2 2 2 2 2 2 -15 2 2 2 2 2 2 2
9
-4 7 -4 -4 7 -4 -4 7 -4
11
-5 8 -5 -5 8 -5 8 -5 -5 8 -5
13
-2 -2 -2 -2 -2 -2 13 -2 -2 -2 -2 -2 -2

result:

ok Ok

Test #32:

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

input:

10
3 9
9 5
9 10
7 9
9 4
6 9
9 8
9 1
2 9
9 9

output:

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

result:

ok Ok

Test #33:

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

input:

10
4 10
10 6
10 10
8 10
10 1
3 10
10 2
10 5
9 10
7 10

output:

11
1 5 1 -9 1 5 1 -9 1 5 1
13
1 5 1 -11 1 5 1 5 1 -11 1 5 1
9
1 1 1 1 1 1 1 1 1
15
1 3 1 3 1 3 1 -15 1 3 1 3 1 3 1
9
1 1 1 1 1 1 1 1 1
11
4 4 -9 4 4 -9 4 4 -9 4 4
9
1 1 1 1 1 1 1 1 1
9
1 1 1 1 1 1 1 1 1
17
2 2 2 2 2 2 2 2 -17 2 2 2 2 2 2 2 2
15
-5 -5 12 -5 -5 12 -5 -5 -5 12 -5 -5 12 -5 -5

result:

ok Ok

Subtask #4:

score: 15
Accepted

Test #34:

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

input:

10
2 3
2 4
4 3
5 3
5 4
6 4
6 5
5 7
7 6
6 8

output:

3
2 -3 2
3
1 -3 1
5
-2 -2 5 -2 -2
6
3 -5 3 3 -5 3
7
-2 -2 -2 7 -2 -2 -2
7
1 -5 1 5 1 -5 1
9
-2 -2 -2 -2 9 -2 -2 -2 -2
10
-5 7 -5 7 -5 -5 7 -5 7 -5
11
-2 -2 -2 -2 -2 11 -2 -2 -2 -2 -2
11
1 3 1 3 1 -11 1 3 1 3 1

result:

ok Ok

Test #35:

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

input:

10
8 7
7 9
8 9
8 10
10 9
11 9
11 10
10 12
12 11
13 11

output:

13
-2 -2 -2 -2 -2 -2 13 -2 -2 -2 -2 -2 -2
14
-7 9 -7 9 -7 9 -7 -7 9 -7 9 -7 9 -7
15
2 2 2 2 2 2 2 -15 2 2 2 2 2 2 2
15
1 3 1 3 1 3 1 -15 1 3 1 3 1 3 1
17
-2 -2 -2 -2 -2 -2 -2 -2 17 -2 -2 -2 -2 -2 -2 -2 -2
18
9 -11 9 -11 9 -11 9 -11 9 9 -11 9 -11 9 -11 9 -11 9
19
-2 -2 -2 -2 -2 -2 -2 -2 -2 19 -2 -2 -...

result:

ok Ok

Test #36:

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

input:

10
13 12
14 12
14 13
15 13
15 14
14 16
15 16
17 15
17 16
16 18

output:

23
-2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 23 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2
23
1 -5 1 -5 1 -5 1 -5 1 -5 1 21 1 -5 1 -5 1 -5 1 -5 1 -5 1
25
-2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 25 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2
26
13 -15 13 -15 13 -15 13 -15 13 -15 13 -15 13 13 -15 13 -15 13 -15 13 -15 13 -15 13 -15 ...

result:

ok Ok

Test #37:

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

input:

10
18 17
17 19
18 19
18 20
20 19
21 19
21 20
20 22
21 22
21 23

output:

33
-2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 33 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2
34
-17 19 -17 19 -17 19 -17 19 -17 19 -17 19 -17 19 -17 19 -17 -17 19 -17 19 -17 19 -17 19 -17 19 -17 19 -17 19 -17 19 -17
35
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 -35 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
...

result:

ok Ok

Test #38:

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

input:

10
23 22
22 24
23 24
25 23
24 25
26 24
26 25
25 27
27 26
26 28

output:

43
-2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 43 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2
43
1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 -43 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1
45
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 -45 2 2 2 2 2 2 2 2 2 2 2 2 2 ...

result:

ok Ok

Test #39:

score: 15
Accepted
time: 38ms
memory: 16164kb

input:

10
83402 83404
52908 52906
74520 74521
24222 24221
1082 1083
8982 8980
10142 10141
34908 34906
58179 58181
50841 50843

output:

166803
1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1...

result:

ok Ok

Test #40:

score: 15
Accepted
time: 34ms
memory: 17112kb

input:

10
20084 20083
10333 10331
98649 98648
72803 72804
40654 40655
1612 1614
26871 26873
5060 5062
60616 60615
6832 6830

output:

40165
-2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 ...

result:

ok Ok

Test #41:

score: 15
Accepted
time: 63ms
memory: 17376kb

input:

10
79524 79523
91096 91095
90747 90749
83462 83460
78387 78388
67918 67920
1682 1681
13180 13179
98702 98700
70766 70767

output:

159045
-2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2...

result:

ok Ok

Test #42:

score: 15
Accepted
time: 41ms
memory: 16520kb

input:

10
18052 18051
55715 55717
57933 57931
78574 78576
37241 37243
4851 4853
83373 83375
37863 37865
37892 37894
83822 83821

output:

36101
-2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 ...

result:

ok Ok

Test #43:

score: 15
Accepted
time: 20ms
memory: 11652kb

input:

10
2394 2392
24337 24339
55254 55256
46338 46339
11158 11159
20181 20182
59816 59818
15018 15020
39382 39381
33622 33623

output:

4783
1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 1 -5 ...

result:

ok Ok

Test #44:

score: 15
Accepted
time: 44ms
memory: 17472kb

input:

10
13518 13517
67574 67576
76936 76938
73347 73349
7000 7001
19392 19391
6627 6626
24433 24432
98264 98265
94139 94141

output:

27033
-2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 ...

result:

ok Ok

Subtask #5:

score: 14
Accepted

Dependency #3:

100%
Accepted

Test #45:

score: 14
Accepted
time: 2ms
memory: 3972kb

input:

10
1476 492
1905 1143
1812 1812
1565 313
1362 908
370 740
1904 272
450 1800
1855 265
1352 1690

output:

1475
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok Ok

Test #46:

score: 14
Accepted
time: 2ms
memory: 3780kb

input:

10
1020 1360
1242 1890
440 440
1506 753
347 347
183 1281
1888 944
354 1770
978 1304
1448 1991

output:

2039
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok Ok

Test #47:

score: 14
Accepted
time: 2ms
memory: 5872kb

input:

10
1635 300
1920 960
780 1950
726 726
1235 1482
902 1804
1392 1392
1159 1647
1422 474
215 1720

output:

1919
1 1 1 1 1 1 1 1 1 1 1 1 1 1 -884 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1051 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -884 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1051 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -884 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1051 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -884 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1051 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -88...

result:

ok Ok

Test #48:

score: 14
Accepted
time: 2ms
memory: 3724kb

input:

10
1628 1628
1750 1274
1044 1566
954 477
1378 1378
1824 456
1540 462
1440 960
326 978
260 767

output:

1627
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok Ok

Test #49:

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

input:

10
780 780
1708 1708
1519 868
972 1242
1028 771
1338 1561
134 268
1808 904
295 59
82 574

output:

779
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok Ok

Test #50:

score: 14
Accepted
time: 2ms
memory: 3756kb

input:

10
1134 1134
654 327
495 1980
766 383
1188 1188
1480 592
387 1641
1274 1274
710 1420
1662 1662

output:

1133
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok Ok

Test #51:

score: 14
Accepted
time: 2ms
memory: 3704kb

input:

10
782 23
1064 1596
654 1308
798 399
1598 282
918 459
1152 1152
510 867
1820 260
1140 456

output:

781
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok Ok

Test #52:

score: 14
Accepted
time: 2ms
memory: 3776kb

input:

10
1540 1540
1560 1950
1295 259
582 388
1494 1992
586 586
372 682
1492 373
1512 945
1980 900

output:

1539
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok Ok

Test #53:

score: 14
Accepted
time: 2ms
memory: 3748kb

input:

10
1734 918
1070 1712
1650 660
416 1248
1341 447
960 1760
304 1824
634 951
818 1227
1029 1029

output:

2549
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 205 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok Ok

Test #54:

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

input:

10
777 259
924 1386
1560 780
327 327
1204 1204
988 741
404 1616
1952 1220
1062 1134
1719 764

output:

776
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok Ok

Test #55:

score: 14
Accepted
time: 3ms
memory: 5856kb

input:

10
2000 1215
2000 1280
897 2000
2000 1353
1268 2000
2000 1946
2000 1796
2000 1073
2000 1804
915 2000

output:

3209
1 1 1 1 856 1 1 1 1 856 1 1 1 1 -2359 1 1 1 1 856 1 1 1 1 856 1 1 1 1 856 1 1 1 1 -2359 1 1 1 1 856 1 1 1 1 856 1 1 1 1 856 1 1 1 1 -2359 1 1 1 1 856 1 1 1 1 856 1 1 1 1 -2359 1 1 1 1 856 1 1 1 1 856 1 1 1 1 856 1 1 1 1 -2359 1 1 1 1 856 1 1 1 1 856 1 1 1 1 856 1 1 1 1 -2359 1 1 1 1 856 1 1 1 1...

result:

ok Ok

Test #56:

score: 14
Accepted
time: 3ms
memory: 5844kb

input:

10
603 1999
825 1999
876 1999
1999 1783
731 1999
1999 1501
1217 1999
1999 1442
1999 1358
1593 1999

output:

2600
315 315 315 315 315 315 315 -2287 315 315 315 315 315 315 315 -2287 315 315 315 315 315 315 315 -2287 315 315 315 315 315 315 315 315 -2287 315 315 315 315 315 315 315 -2287 315 315 315 315 315 315 315 -2287 315 315 315 315 315 315 315 -2287 315 315 315 315 315 315 315 315 -2287 315 315 315 315...

result:

ok Ok

Test #57:

score: 14
Accepted
time: 3ms
memory: 3908kb

input:

10
1279 1998
1998 634
528 1998
1257 1998
1254 1998
1998 1414
1998 1991
1998 1861
938 1998
1991 1998

output:

3275
-474 -474 -474 -474 -474 2803 -474 -474 -474 -474 -474 -474 2803 -474 -474 -474 -474 -474 -474 2803 -474 -474 -474 -474 -474 -474 2803 -474 -474 -474 -474 -474 -474 2803 -474 -474 -474 -474 -474 -474 2803 -474 -474 -474 -474 -474 -474 2803 -474 -474 -474 -474 -474 -474 2803 -474 -474 -474 -474 ...

result:

ok Ok

Test #58:

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

input:

10
751 1997
1997 980
1997 1254
1927 1997
1015 1997
1997 1261
1119 1997
1997 1083
1441 1997
1997 1379

output:

2746
161 161 161 161 161 161 161 161 161 161 161 161 161 161 161 161 -2587 161 161 161 161 161 161 161 161 161 161 161 161 161 161 161 161 -2587 161 161 161 161 161 161 161 161 161 161 161 161 161 161 161 161 -2587 161 161 161 161 161 161 161 161 161 161 161 161 161 161 161 161 -2587 161 161 161 161...

result:

ok Ok

Test #59:

score: 14
Accepted
time: 3ms
memory: 4120kb

input:

10
1996 1506
1921 1996
1996 1996
1996 1649
1038 1996
1996 1115
1539 1996
1996 595
1996 853
1913 1996

output:

3499
1 -973 1 -973 1 2529 1 -973 1 -973 1 -973 1 2529 1 -973 1 -973 1 2529 1 -973 1 -973 1 -973 1 2529 1 -973 1 -973 1 -973 1 2529 1 -973 1 -973 1 2529 1 -973 1 -973 1 -973 1 2529 1 -973 1 -973 1 2529 1 -973 1 -973 1 -973 1 2529 1 -973 1 -973 1 -973 1 2529 1 -973 1 -973 1 2529 1 -973 1 -973 1 -973 1...

result:

ok Ok

Test #60:

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

input:

10
685 1995
1577 1995
1995 573
1995 1050
1587 1995
1507 1995
1742 1995
1995 1725
1995 1461
1995 794

output:

2674
1 1 1 1 1111 1 1 1 1 -1569 1 1 1 1 1111 1 1 1 1 -1569 1 1 1 1 1111 1 1 1 1 1111 1 1 1 1 -1569 1 1 1 1 1111 1 1 1 1 -1569 1 1 1 1 1111 1 1 1 1 1111 1 1 1 1 -1569 1 1 1 1 1111 1 1 1 1 -1569 1 1 1 1 1111 1 1 1 1 -1569 1 1 1 1 1111 1 1 1 1 1111 1 1 1 1 -1569 1 1 1 1 1111 1 1 1 1 -1569 1 1 1 1 1111 ...

result:

ok Ok

Test #61:

score: 14
Accepted
time: 3ms
memory: 5808kb

input:

10
1617 1994
1994 1687
1701 1994
1067 1994
1994 1922
1994 1474
1994 1187
1994 1405
1227 1994
1886 1994

output:

3609
795 795 795 -2816 795 795 795 795 -2816 795 795 795 -2816 795 795 795 795 -2816 795 795 795 -2816 795 795 795 795 -2816 795 795 795 -2816 795 795 795 795 -2816 795 795 795 -2816 795 795 795 795 -2816 795 795 795 -2816 795 795 795 795 -2816 795 795 795 795 -2816 795 795 795 -2816 795 795 795 795...

result:

ok Ok

Test #62:

score: 14
Accepted
time: 3ms
memory: 6144kb

input:

10
1898 1993
727 1993
1993 762
1404 1993
722 1993
1993 776
1993 967
1571 1993
1993 1247
1993 1869

output:

3889
-1925 1966 -1925 1966 -1925 1966 -1925 1966 -1925 1966 -1925 1966 -1925 1966 -1925 1966 -1925 1966 -1925 1966 -1925 1966 -1925 1966 -1925 1966 -1925 1966 -1925 1966 -1925 1966 -1925 1966 -1925 1966 -1925 1966 -1925 1966 -1925 1966 -1925 1966 -1925 1966 -1925 1966 -1925 1966 -1925 1966 -1925 196...

result:

ok Ok

Test #63:

score: 14
Accepted
time: 3ms
memory: 3880kb

input:

10
1992 1861
601 1992
1137 1992
1992 1647
1992 738
1992 1490
1808 1992
1527 1992
1730 1992
1992 1669

output:

3851
1000 1000 -2853 1000 1000 1000 -2853 1000 1000 1000 -2853 1000 1000 1000 -2853 1000 1000 1000 -2853 1000 1000 1000 -2853 1000 1000 -2853 1000 1000 1000 -2853 1000 1000 1000 -2853 1000 1000 1000 -2853 1000 1000 1000 -2853 1000 1000 1000 -2853 1000 1000 1000 -2853 1000 1000 -2853 1000 1000 1000 -...

result:

ok Ok

Test #64:

score: 14
Accepted
time: 3ms
memory: 3840kb

input:

10
1991 1256
1991 1716
984 1991
1991 928
1890 1991
1991 785
1991 1619
1808 1991
1058 1991
1991 1890

output:

3245
-349 -349 -349 -349 -349 -349 -349 -349 2898 -349 -349 -349 -349 -349 -349 -349 -349 2898 -349 -349 -349 -349 -349 -349 -349 -349 2898 -349 -349 -349 -349 -349 -349 -349 -349 -349 2898 -349 -349 -349 -349 -349 -349 -349 -349 2898 -349 -349 -349 -349 -349 -349 -349 -349 2898 -349 -349 -349 -349 ...

result:

ok Ok

Subtask #6:

score: 18
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #5:

100%
Accepted

Test #65:

score: 18
Accepted
time: 15ms
memory: 11488kb

input:

10
45595 41450
35430 42516
45331 45331
35412 44265
49448 44150
38904 38904
27456 45760
42064 41108
46207 46207
37224 45144

output:

82899
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok Ok

Test #66:

score: 18
Accepted
time: 34ms
memory: 9992kb

input:

10
34242 42144
43344 42140
49630 42540
42528 49616
43074 43074
34182 45576
49252 45734
33728 40052
48250 44390
48807 37323

output:

73751
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok Ok

Test #67:

score: 18
Accepted
time: 32ms
memory: 10056kb

input:

10
49088 49088
46908 41696
49230 41025
34534 43446
46988 38696
44205 41258
45528 40650
48698 46825
48195 41310
46210 46210

output:

49087
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok Ok

Test #68:

score: 18
Accepted
time: 28ms
memory: 9500kb

input:

10
37645 37645
35924 46188
29988 39984
36972 49296
34570 34570
46618 42380
35116 35116
38728 48410
31570 45100
38430 38430

output:

37644
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok Ok

Test #69:

score: 18
Accepted
time: 34ms
memory: 9884kb

input:

10
42672 42672
48095 38476
28668 47780
36636 49020
44985 35988
49596 45463
44928 46656
28580 35725
39370 43307
39228 39228

output:

42671
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok Ok

Test #70:

score: 18
Accepted
time: 32ms
memory: 9548kb

input:

10
36666 40740
38960 48700
45155 45155
37611 39402
49269 40311
49600 49600
39650 42700
41025 49230
38268 47835
43540 43540

output:

73331
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok Ok

Test #71:

score: 18
Accepted
time: 28ms
memory: 9660kb

input:

10
38291 41772
49365 49365
45295 45295
39270 44880
30490 42686
27159 36212
36099 45458
43956 43956
36388 36388
44135 35308

output:

76581
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok Ok

Test #72:

score: 18
Accepted
time: 28ms
memory: 9920kb

input:

10
41220 41220
30030 36036
35607 45318
42994 42994
34064 34064
42055 33644
49080 45808
28748 43122
30112 45168
34152 38421

output:

41219
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok Ok

Test #73:

score: 18
Accepted
time: 25ms
memory: 9808kb

input:

10
37316 46645
40470 33725
40358 48667
34122 45496
45034 48950
45808 49080
42536 49080
42444 47160
40080 32064
33460 41825

output:

74631
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok Ok

Test #74:

score: 18
Accepted
time: 26ms
memory: 9544kb

input:

10
44800 44800
44280 41328
34624 49772
37527 41101
37898 43312
38772 38772
36810 44172
40581 42084
38196 38196
42840 42840

output:

44799
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok Ok

Test #75:

score: 18
Accepted
time: 36ms
memory: 9660kb

input:

10
45592 45592
33475 48925
42738 49023
49472 37104
36491 42105
39694 48168
37816 47270
33872 48691
46624 40796
34400 41280

output:

45591
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok Ok

Test #76:

score: 18
Accepted
time: 30ms
memory: 10216kb

input:

10
48240 40200
45808 45808
37200 44640
45612 48870
47664 35748
48678 41724
36550 36550
36448 38726
47556 43593
44090 48499

output:

80399
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok Ok

Test #77:

score: 18
Accepted
time: 14ms
memory: 9816kb

input:

10
41888 41888
44560 44560
36477 48636
42775 42775
48510 45276
48202 39438
34452 43065
39120 45640
27684 46140
38619 47201

output:

41887
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok Ok

Test #78:

score: 18
Accepted
time: 28ms
memory: 9420kb

input:

10
43320 43320
37611 48357
31372 39215
37480 37480
34900 34900
46504 40691
37500 37500
41495 41495
47432 40376
44688 39102

output:

43319
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok Ok

Test #79:

score: 18
Accepted
time: 22ms
memory: 9936kb

input:

10
38340 46008
42336 44100
33600 44800
36485 36485
29528 36910
37458 49944
48464 43680
33088 41360
36070 43284
48084 48084

output:

76679
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok Ok

Test #80:

score: 18
Accepted
time: 111ms
memory: 11920kb

input:

10
49706 50000
50000 49651
50000 49252
49588 50000
50000 49361
49931 50000
49959 50000
49537 50000
50000 49361
50000 49939

output:

99703
1 29843 1 29843 1 -69863 1 29843 1 29843 1 -69863 1 29843 1 29843 1 29843 1 -69863 1 29843 1 29843 1 -69863 1 29843 1 29843 1 -69863 1 29843 1 29843 1 29843 1 -69863 1 29843 1 29843 1 -69863 1 29843 1 29843 1 -69863 1 29843 1 29843 1 29843 1 -69863 1 29843 1 29843 1 -69863 1 29843 1 29843 1 -6...

result:

ok Ok

Test #81:

score: 18
Accepted
time: 111ms
memory: 10576kb

input:

10
49999 49445
49999 49427
49685 49999
49668 49999
49999 49507
49999 49034
49999 49483
49795 49999
49011 49999
49617 49999

output:

99442
-49363 50081 -49363 50081 -49363 50081 -49363 50081 -49363 50081 -49363 50081 -49363 50081 -49363 50081 -49363 50081 -49363 50081 -49363 50081 -49363 50081 -49363 50081 -49363 50081 -49363 50081 -49363 50081 -49363 50081 -49363 50081 -49363 50081 -49363 50081 -49363 50081 -49363 50081 -49363 5...

result:

ok Ok

Test #82:

score: 18
Accepted
time: 83ms
memory: 10204kb

input:

10
49818 49998
49741 49998
49998 49736
49885 49998
49590 49998
49998 49345
49573 49998
49392 49998
49998 49935
49263 49998

output:

99809
1 1 1 1 1 43249 1 1 1 1 1 -56567 1 1 1 1 1 43249 1 1 1 1 1 -56567 1 1 1 1 1 43249 1 1 1 1 1 -56567 1 1 1 1 1 43249 1 1 1 1 1 43249 1 1 1 1 1 -56567 1 1 1 1 1 43249 1 1 1 1 1 -56567 1 1 1 1 1 43249 1 1 1 1 1 -56567 1 1 1 1 1 43249 1 1 1 1 1 43249 1 1 1 1 1 -56567 1 1 1 1 1 43249 1 1 1 1 1 -5656...

result:

ok Ok

Test #83:

score: 18
Accepted
time: 95ms
memory: 10620kb

input:

10
49829 49997
49997 49314
49714 49997
49215 49997
49143 49997
49997 49995
49997 49439
49997 49902
49532 49997
49997 49178

output:

99824
-2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 96855 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 ...

result:

ok Ok

Test #84:

score: 18
Accepted
time: 84ms
memory: 10200kb

input:

10
49996 49786
49648 49996
49273 49996
49850 49996
49929 49996
49996 49120
49241 49996
49623 49996
49305 49996
49872 49996

output:

99779
1 -12355 1 -12355 1 -12355 1 -12355 1 -12355 1 -12355 1 -12355 1 87427 1 -12355 1 -12355 1 -12355 1 -12355 1 -12355 1 -12355 1 -12355 1 87427 1 -12355 1 -12355 1 -12355 1 -12355 1 -12355 1 -12355 1 -12355 1 87427 1 -12355 1 -12355 1 -12355 1 -12355 1 -12355 1 -12355 1 -12355 1 87427 1 -12355 1...

result:

ok Ok

Test #85:

score: 18
Accepted
time: 94ms
memory: 10448kb

input:

10
49398 49995
49855 49995
49322 49995
49340 49995
49995 49834
49588 49995
49995 49098
49995 49783
49074 49995
49995 49437

output:

99389
1 1 -19481 1 1 -19481 1 1 -19481 1 1 -19481 1 1 79912 1 1 -19481 1 1 -19481 1 1 -19481 1 1 -19481 1 1 79912 1 1 -19481 1 1 -19481 1 1 -19481 1 1 -19481 1 1 79912 1 1 -19481 1 1 -19481 1 1 -19481 1 1 -19481 1 1 79912 1 1 -19481 1 1 -19481 1 1 -19481 1 1 -19481 1 1 79912 1 1 -19481 1 1 -19481 1 ...

result:

ok Ok

Test #86:

score: 18
Accepted
time: 77ms
memory: 10336kb

input:

10
49878 49994
49994 49210
49994 49047
49994 49581
49994 49810
49994 49632
49994 49567
49994 49654
49994 49237
49994 49877

output:

99869
1 1721 1 1721 1 1721 1 1721 1 1721 1 1721 1 1721 1 1721 1 1721 1 1721 1 1721 1 1721 1 1721 1 1721 1 1721 1 1721 1 1721 1 1721 1 1721 1 1721 1 1721 1 1721 1 1721 1 1721 1 1721 1 1721 1 1721 1 1721 1 1721 1 1721 1 1721 1 1721 1 1721 1 1721 1 1721 1 1721 1 1721 1 1721 1 1721 1 1721 1 1721 1 1721 ...

result:

ok Ok

Test #87:

score: 18
Accepted
time: 112ms
memory: 12216kb

input:

10
49993 49603
49993 49548
49927 49993
49993 49789
49993 49297
49376 49993
49993 49378
49993 49008
49993 49394
49327 49993

output:

99594
47755 -51841 47755 -51841 47755 -51841 47755 -51841 47755 -51841 47755 -51841 47755 -51841 47755 -51841 47755 -51841 47755 -51841 47755 -51841 47755 47755 -51841 47755 -51841 47755 -51841 47755 -51841 47755 -51841 47755 -51841 47755 -51841 47755 -51841 47755 -51841 47755 -51841 47755 -51841 47...

result:

ok Ok

Test #88:

score: 18
Accepted
time: 61ms
memory: 10440kb

input:

10
49269 49992
49992 49773
49992 49537
49992 49552
49992 49639
49560 49992
49040 49992
49620 49992
49402 49992
49974 49992

output:

99257
1 1 -25538 1 1 -25538 1 1 73723 1 1 -25538 1 1 -25538 1 1 -25538 1 1 73723 1 1 -25538 1 1 -25538 1 1 -25538 1 1 73723 1 1 -25538 1 1 -25538 1 1 -25538 1 1 73723 1 1 -25538 1 1 -25538 1 1 -25538 1 1 73723 1 1 -25538 1 1 -25538 1 1 -25538 1 1 73723 1 1 -25538 1 1 -25538 1 1 -25538 1 1 73723 1 1 ...

result:

ok Ok

Test #89:

score: 18
Accepted
time: 118ms
memory: 10580kb

input:

10
49991 49234
49991 49239
49430 49991
49991 49462
49596 49991
49309 49991
49536 49991
49537 49991
49943 49991
49991 49478

output:

99223
-34211 65014 -34211 -34211 65014 -34211 -34211 65014 -34211 -34211 65014 -34211 -34211 65014 -34211 -34211 65014 -34211 -34211 65014 -34211 -34211 65014 -34211 -34211 65014 -34211 -34211 65014 -34211 65014 -34211 -34211 65014 -34211 -34211 65014 -34211 -34211 65014 -34211 -34211 65014 -34211 -...

result:

ok Ok

Test #90:

score: 18
Accepted
time: 122ms
memory: 12076kb

input:

10
49990 49723
49990 49768
49990 49687
49990 49063
49803 49990
49990 49554
49960 49990
49990 49806
49383 49990
49627 49990

output:

99711
-13071 -13071 -13071 -13071 -13071 -13071 86642 -13071 -13071 -13071 -13071 -13071 -13071 -13071 86642 -13071 -13071 -13071 -13071 -13071 -13071 86642 -13071 -13071 -13071 -13071 -13071 -13071 -13071 86642 -13071 -13071 -13071 -13071 -13071 -13071 -13071 86642 -13071 -13071 -13071 -13071 -1307...

result:

ok Ok

Test #91:

score: 18
Accepted
time: 117ms
memory: 10228kb

input:

10
49804 49989
49989 49271
49989 49986
49586 49989
49789 49989
49989 49695
49007 49989
49526 49989
49989 49740
49989 49248

output:

99791
-10249 -10249 -10249 -10249 -10249 -10249 -10249 -10249 89544 -10249 -10249 -10249 -10249 -10249 -10249 -10249 -10249 -10249 89544 -10249 -10249 -10249 -10249 -10249 -10249 -10249 -10249 -10249 89544 -10249 -10249 -10249 -10249 -10249 -10249 -10249 -10249 89544 -10249 -10249 -10249 -10249 -102...

result:

ok Ok

Test #92:

score: 18
Accepted
time: 98ms
memory: 12076kb

input:

10
49155 49988
49988 49201
49988 49411
49298 49988
49505 49988
49997 49988
49988 49882
49988 49813
49988 49926
49988 49661

output:

99141
12378 12378 12378 12378 12378 12378 12378 -86765 12378 12378 12378 12378 12378 12378 12378 -86765 12378 12378 12378 12378 12378 12378 12378 -86765 12378 12378 12378 12378 12378 12378 12378 -86765 12378 12378 12378 12378 12378 12378 12378 -86765 12378 12378 12378 12378 12378 12378 12378 -86765 ...

result:

ok Ok

Test #93:

score: 18
Accepted
time: 107ms
memory: 11892kb

input:

10
49937 49987
49987 49553
49321 49987
49791 49987
49405 49987
49987 49107
49957 49987
49585 49987
49016 49987
49987 49688

output:

99922
-45965 53959 -45965 53959 -45965 53959 -45965 53959 -45965 53959 -45965 -45965 53959 -45965 53959 -45965 53959 -45965 53959 -45965 53959 -45965 53959 -45965 -45965 53959 -45965 53959 -45965 53959 -45965 53959 -45965 53959 -45965 53959 -45965 -45965 53959 -45965 53959 -45965 53959 -45965 53959 ...

result:

ok Ok

Test #94:

score: 18
Accepted
time: 81ms
memory: 11912kb

input:

10
49833 49986
49256 49986
49934 49986
49519 49986
49986 49855
49334 49986
49986 49406
49986 49315
49671 49986
49707 49986

output:

99809
1 1 1 1 1 1 1 1 41095 1 1 1 1 1 1 1 1 -58724 1 1 1 1 1 1 1 1 41095 1 1 1 1 1 1 1 1 -58724 1 1 1 1 1 1 1 1 41095 1 1 1 1 1 1 1 1 41095 1 1 1 1 1 1 1 1 -58724 1 1 1 1 1 1 1 1 41095 1 1 1 1 1 1 1 1 -58724 1 1 1 1 1 1 1 1 41095 1 1 1 1 1 1 1 1 41095 1 1 1 1 1 1 1 1 -58724 1 1 1 1 1 1 1 1 41095 1 1...

result:

ok Ok

Subtask #7:

score: 24
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Dependency #4:

100%
Accepted

Dependency #5:

100%
Accepted

Dependency #6:

100%
Accepted

Test #95:

score: 24
Accepted
time: 67ms
memory: 20516kb

input:

10
72070 72070
103113 91656
172194 86097
89655 107586
111643 143541
111756 105257
111424 111424
189900 94950
136496 136496
195720 97860

output:

72069
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok Ok

Test #96:

score: 24
Accepted
time: 108ms
memory: 29084kb

input:

10
187168 99433
181147 132994
77040 154080
91302 182604
166755 155638
157950 94770
157425 94455
107916 143888
177210 196900
181024 181024

output:

280751
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok Ok

Test #97:

score: 24
Accepted
time: 104ms
memory: 24592kb

input:

10
125755 114976
129145 145990
139005 166806
196626 131084
143600 98725
119643 159524
86968 130452
197316 131544
79502 198755
93198 186396

output:

237137
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok Ok

Test #98:

score: 24
Accepted
time: 82ms
memory: 25916kb

input:

10
151576 75788
137316 91544
154470 77235
194292 122332
97150 145725
102288 115074
148083 148083
95550 127400
146820 146820
167770 167770

output:

151575
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok Ok

Test #99:

score: 24
Accepted
time: 97ms
memory: 23940kb

input:

10
91950 137925
188152 141114
93108 186216
134232 121448
110592 92160
126720 168960
117095 163933
93240 186480
81684 163368
188321 80709

output:

183899
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok Ok

Test #100:

score: 24
Accepted
time: 96ms
memory: 23000kb

input:

10
122135 142804
122830 122830
88840 199890
106305 124955
141770 99239
160305 128244
70754 176885
75696 126160
165966 110644
89500 143200

output:

263059
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok Ok

Test #101:

score: 24
Accepted
time: 86ms
memory: 27884kb

input:

10
137481 183308
106110 141480
115143 153524
99168 99168
173507 167910
198583 113476
116109 77406
98752 148128
194514 194514
107613 166311

output:

274961
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok Ok

Test #102:

score: 24
Accepted
time: 84ms
memory: 25596kb

input:

10
103192 193485
128184 164808
139440 139440
98365 98365
104742 163461
190960 190960
149387 149387
193060 106183
124869 83246
125456 172502

output:

283777
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok Ok

Test #103:

score: 24
Accepted
time: 90ms
memory: 26492kb

input:

10
197730 121680
151088 151088
127888 191832
139872 192324
93423 93423
176640 122130
119889 154143
121190 121190
169479 94155
81942 81942

output:

304199
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok Ok

Test #104:

score: 24
Accepted
time: 102ms
memory: 27284kb

input:

10
156706 142460
75555 100740
136374 194820
199918 136786
97674 146511
95898 183078
165330 192885
129096 164956
165210 165210
192816 192816

output:

284919
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok Ok

Test #105:

score: 24
Accepted
time: 86ms
memory: 28824kb

input:

10
124359 82906
107130 89275
195648 163040
75338 75338
192855 102856
120196 120196
78480 196200
144300 177970
124032 195840
165120 196080

output:

165811
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok Ok

Test #106:

score: 24
Accepted
time: 75ms
memory: 29436kb

input:

10
85482 170964
165222 119327
157962 157962
81771 81771
175797 190734
97654 97654
176275 160250
184756 184756
159590 127672
115080 115080

output:

170963
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok Ok

Test #107:

score: 24
Accepted
time: 100ms
memory: 27732kb

input:

10
174328 174328
127890 170520
112263 149684
147690 98460
183035 183035
154485 154485
96165 128220
163296 176256
140658 195818
130722 174296

output:

174327
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok Ok

Test #108:

score: 24
Accepted
time: 102ms
memory: 28208kb

input:

10
151368 191012
108800 149600
142448 178060
93546 93546
97780 195560
101830 173710
116688 145860
176890 163660
132212 99159
141324 188432

output:

338775
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok Ok

Test #109:

score: 24
Accepted
time: 93ms
memory: 30052kb

input:

10
199680 176160
150465 120372
160544 185629
127964 127964
155166 103444
96732 193464
176768 176768
150138 125115
123426 123426
149835 119868

output:

375359
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok Ok

Test #110:

score: 24
Accepted
time: 523ms
memory: 31900kb

input:

10
200000 193880
200000 194742
200000 199658
199275 200000
195306 200000
200000 192727
200000 193253
200000 193548
200000 193963
200000 195354

output:

393839
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -64399 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -64399 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -64399 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok Ok

Test #111:

score: 24
Accepted
time: 979ms
memory: 31836kb

input:

10
199999 192586
193701 199999
196132 199999
190124 199999
192836 199999
193578 199999
199999 196684
199999 199644
199999 192549
197953 199999

output:

392583
33576 33576 33576 33576 33576 33576 33576 33576 33576 33576 -359009 33576 33576 33576 33576 33576 33576 33576 33576 33576 33576 33576 -359009 33576 33576 33576 33576 33576 33576 33576 33576 33576 33576 33576 -359009 33576 33576 33576 33576 33576 33576 33576 33576 33576 33576 -359009 33576 335...

result:

ok Ok

Test #112:

score: 24
Accepted
time: 657ms
memory: 31944kb

input:

10
199998 194393
199998 190852
198218 199998
192520 199998
199998 193017
197147 199998
199998 199261
192363 199998
199998 190874
199176 199998

output:

394389
178162 -216229 178162 -216229 178162 -216229 178162 -216229 178162 178162 -216229 178162 -216229 178162 -216229 178162 -216229 178162 -216229 178162 178162 -216229 178162 -216229 178162 -216229 178162 -216229 178162 -216229 178162 178162 -216229 178162 -216229 178162 -216229 178162 -216229 17...

result:

ok Ok

Test #113:

score: 24
Accepted
time: 783ms
memory: 31768kb

input:

10
199997 190606
199997 196151
191720 199997
199997 198151
194250 199997
194873 199997
199997 196561
199997 198696
198438 199997
199997 198318

output:

390601
12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 -378125 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 124...

result:

ok Ok

Test #114:

score: 24
Accepted
time: 809ms
memory: 31912kb

input:

10
199996 195824
190171 199996
199996 198995
194026 199996
199213 199996
199996 199975
199889 199996
198387 199996
199996 198071
195470 199996

output:

395815
1 1 1 133961 1 1 1 -261859 1 1 1 133961 1 1 1 133961 1 1 1 -261859 1 1 1 133961 1 1 1 133961 1 1 1 -261859 1 1 1 133961 1 1 1 133961 1 1 1 -261859 1 1 1 133961 1 1 1 133961 1 1 1 -261859 1 1 1 133961 1 1 1 133961 1 1 1 -261859 1 1 1 133961 1 1 1 133961 1 1 1 -261859 1 1 1 133961 1 1 1 133961 ...

result:

ok Ok

Test #115:

score: 24
Accepted
time: 853ms
memory: 31896kb

input:

10
199995 199012
199995 199817
192717 199995
199995 198534
196688 199995
199995 195808
199995 197552
193661 199995
198736 199995
199995 194674

output:

399005
43838 43838 43838 43838 43838 43838 43838 43838 -355169 43838 43838 43838 43838 43838 43838 43838 43838 -355169 43838 43838 43838 43838 43838 43838 43838 43838 -355169 43838 43838 43838 43838 43838 43838 43838 43838 -355169 43838 43838 43838 43838 43838 43838 43838 43838 -355169 43838 43838 4...

result:

ok Ok

Test #116:

score: 24
Accepted
time: 772ms
memory: 32228kb

input:

10
199994 193360
196217 199994
199994 194677
199994 199774
199994 191268
199994 194429
199994 191329
199994 199529
195611 199994
191832 199994

output:

393351
1 72693 1 72693 1 72693 1 72693 1 -320661 1 72693 1 72693 1 72693 1 72693 1 -320661 1 72693 1 72693 1 72693 1 72693 1 72693 1 -320661 1 72693 1 72693 1 72693 1 72693 1 -320661 1 72693 1 72693 1 72693 1 72693 1 72693 1 -320661 1 72693 1 72693 1 72693 1 72693 1 -320661 1 72693 1 72693 1 72693 1...

result:

ok Ok

Test #117:

score: 24
Accepted
time: 778ms
memory: 31832kb

input:

10
199993 199723
199993 195281
196381 199993
199993 195814
190106 199993
194656 199993
199993 195793
199993 192288
194329 199993
190758 199993

output:

399714
10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 -389353 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 103...

result:

ok Ok

Test #118:

score: 24
Accepted
time: 601ms
memory: 31848kb

input:

10
194946 199992
199816 199992
190139 199992
199671 199992
199992 197575
199992 196977
194410 199992
199705 199992
199992 196438
193213 199992

output:

394931
1 1 1 1 1 -180803 1 1 1 1 1 214135 1 1 1 1 1 -180803 1 1 1 1 1 214135 1 1 1 1 1 -180803 1 1 1 1 1 214135 1 1 1 1 1 -180803 1 1 1 1 1 214135 1 1 1 1 1 -180803 1 1 1 1 1 214135 1 1 1 1 1 -180803 1 1 1 1 1 -180803 1 1 1 1 1 214135 1 1 1 1 1 -180803 1 1 1 1 1 214135 1 1 1 1 1 -180803 1 1 1 1 1 21...

result:

ok Ok

Test #119:

score: 24
Accepted
time: 836ms
memory: 31764kb

input:

10
199991 197278
192670 199991
197430 199991
199991 192992
195754 199991
194473 199991
199991 197760
193428 199991
199991 195552
199991 199134

output:

397267
68530 68530 68530 68530 -328739 68530 68530 68530 68530 68530 -328739 68530 68530 68530 68530 68530 -328739 68530 68530 68530 68530 68530 -328739 68530 68530 68530 68530 -328739 68530 68530 68530 68530 68530 -328739 68530 68530 68530 68530 68530 -328739 68530 68530 68530 68530 68530 -328739 6...

result:

ok Ok

Test #120:

score: 24
Accepted
time: 638ms
memory: 31772kb

input:

10
199990 192797
199990 195943
198539 199990
199990 193118
199990 198487
190132 199990
199110 199990
198168 199990
199125 199990
199990 197541

output:

392785
6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 638...

result:

ok Ok

Test #121:

score: 24
Accepted
time: 598ms
memory: 32020kb

input:

10
190153 199989
196353 199989
199808 199989
199989 197786
199989 190059
190668 199989
199989 195135
195508 199989
199989 194734
199989 197685

output:

390140
147989 -242153 147989 147989 -242153 147989 -242153 147989 147989 -242153 147989 147989 -242153 147989 -242153 147989 147989 -242153 147989 147989 -242153 147989 -242153 147989 147989 -242153 147989 -242153 147989 147989 -242153 147989 147989 -242153 147989 -242153 147989 147989 -242153 14798...

result:

ok Ok

Test #122:

score: 24
Accepted
time: 703ms
memory: 31744kb

input:

10
199988 190951
190047 199988
193024 199988
199988 191514
199988 191145
190908 199988
199988 196627
196890 199988
194909 199988
190113 199988

output:

390937
-125540 -125540 265399 -125540 -125540 265399 -125540 -125540 265399 -125540 -125540 265399 -125540 -125540 265399 -125540 -125540 265399 -125540 -125540 265399 -125540 -125540 265399 -125540 -125540 -125540 265399 -125540 -125540 265399 -125540 -125540 265399 -125540 -125540 265399 -125540 -...

result:

ok Ok

Test #123:

score: 24
Accepted
time: 957ms
memory: 31892kb

input:

10
193218 199987
190541 199987
194782 199987
196511 199987
199987 191581
199631 199987
199987 196736
198846 199987
190851 199987
196581 199987

output:

393203
-86727 -86727 -86727 306478 -86727 -86727 -86727 -86727 306478 -86727 -86727 -86727 306478 -86727 -86727 -86727 -86727 306478 -86727 -86727 -86727 306478 -86727 -86727 -86727 -86727 306478 -86727 -86727 -86727 306478 -86727 -86727 -86727 -86727 306478 -86727 -86727 -86727 306478 -86727 -86727...

result:

ok Ok

Test #124:

score: 24
Accepted
time: 435ms
memory: 31864kb

input:

10
199986 197337
199986 190188
199986 195749
199986 197259
199986 199539
199986 193837
199986 192018
198490 199986
199986 190611
199986 191622

output:

397319
1 1 88192 1 1 88192 1 1 88192 1 1 -309131 1 1 88192 1 1 88192 1 1 88192 1 1 88192 1 1 -309131 1 1 88192 1 1 88192 1 1 88192 1 1 -309131 1 1 88192 1 1 88192 1 1 88192 1 1 88192 1 1 -309131 1 1 88192 1 1 88192 1 1 88192 1 1 -309131 1 1 88192 1 1 88192 1 1 88192 1 1 88192 1 1 -309131 1 1 88192 1...

result:

ok Ok

Test #125:

score: 24
Accepted
time: 183ms
memory: 31984kb

input:

10
200000 199999
199999 200000
200000 199999
200000 199999
199999 200000
200000 199999
199999 200000
199999 200000
200000 199999
199999 200000

output:

399997
-2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2...

result:

ok Ok