CSES - Datatähti 2024 loppu - Results
Submission details
Task:Retkeily
Sender:EeliH
Submission time:2024-01-20 15:50:20 +0200
Language:C++20
Status:READY
Result:0
Feedback
groupverdictscore
#10
#20
#30
#40
Test results
testverdicttimegroup
#1ACCEPTED0.08 s1, 2, 3, 4details
#2ACCEPTED0.08 s1, 2, 3, 4details
#3ACCEPTED0.08 s1, 2, 3, 4details
#4ACCEPTED0.08 s1, 2, 3, 4details
#5ACCEPTED0.08 s1, 2, 3, 4details
#6--1, 2, 4details
#7ACCEPTED0.09 s1, 2, 4details
#8ACCEPTED0.08 s1, 2, 3, 4details
#9ACCEPTED0.15 s1, 2, 4details
#10ACCEPTED0.11 s1, 2, 3, 4details
#11--1, 2, 4details
#12--1, 2, 4details
#13ACCEPTED0.10 s1, 2, 4details
#14--1, 2, 4details
#15--1, 2, 4details
#16ACCEPTED0.15 s2, 4details
#17--2, 4details
#18ACCEPTED0.79 s2, 4details
#19ACCEPTED0.48 s2, 3, 4details
#20--2, 4details
#21--2, 3, 4details
#22ACCEPTED0.08 s1, 3, 4details
#23ACCEPTED0.15 s1, 3, 4details
#24ACCEPTED0.83 s3, 4details
#25--3, 4details
#26--3, 4details
#27--3, 4details
#28--3, 4details
#29--1, 4details
#30--1, 4details
#31--1, 4details
#32--1, 4details
#33--1, 4details
#34--1, 4details
#35--1, 4details
#36--1, 4details
#37--4details
#38--4details
#39--4details
#40--4details
#410.22 s4details

Code

#include <bits/stdc++.h>
using namespace std;

#define MAGIC 22

int n, m;
vector<pair<int, int>> varatutxy;
vector<pair<int, int>> vapaatxy;
vector<pair<int, int>> varatutyx;
vector<pair<int, int>> vapaatyx;
set<int> takencols[1000039];
set<int> takenrows[1000093];

bool is_dist_free(int x, int y, int n)
{
    cerr << x << " " << y << " " << n << endl;
    //assert(n <= 10);
    
    for (int i = 0; i < n + 1; i++) {
        if (takencols[x - n + i + MAGIC].contains(y + i)) {
            return false;
        }
    }

    for (int i = 0; i < n + 1; i++) {
        if (takencols[x + i + MAGIC].contains(y + n - i)) {
            return false;
        }
    }

    for (int i = 0; i < n + 1; i++) {
        if (takencols[x + n - i + MAGIC].contains(y - i)) {
            return false;
        }
    }

    for (int i = 0; i < n + 1; i++) {
        if (takencols[x - i + MAGIC].contains(y - n + i)) {
            return false;
        }
    }

    return true;
}

int main()
{
    cin >> n >> m;
    
    for (int i = 0; i < n; i++) {
        int x, y;
        cin >> x >> y;
        varatutxy.push_back(make_pair(x, y));
        takencols[x + MAGIC].insert(y);
    }

    for (int i = 0; i < m; i++) {
        int x, y;
        cin >> x >> y;
        vapaatxy.push_back(make_pair(x, y));
    }

    int maxd = 0;
    for (int i = 0; i < m; i++) {
        cerr << "checking " << vapaatxy[i].first << ", " << vapaatxy[i].second << endl;
        for (int j = 1;; j++) {
            if (!is_dist_free(vapaatxy[i].first, vapaatxy[i].second, j)) {
                cerr << "found " << j << endl;
                maxd = max(maxd, j);
                break;
            }
        }
    }

    cout << maxd << endl;
}

Test details

Test 1

Group: 1, 2, 3, 4

Verdict: ACCEPTED

input
1 1
6 6
8 9

correct output
5

user output
5

Error:
checking 8, 9
8 9 1
8 9 2
8 9 3
8 9 4
8 9 5
found 5

Test 2

Group: 1, 2, 3, 4

Verdict: ACCEPTED

input
5 5
5 10
8 10
1 2
4 10
...

correct output
4

user output
4

Error:
checking 1, 4
1 4 1
1 4 2
found 2
checking 2, 4
2 4 1
found 1
checking 4, 7
4 7 1
4 7 2
4 7 3
found 3
checking 6, 9
6 9 1
6 9 2
found 2
checking 5, 4
5 4 1
5 4 2
5 4 3
5 4 4
found 4

Test 3

Group: 1, 2, 3, 4

Verdict: ACCEPTED

input
10 10
5 2
1 10
6 10
5 5
...

correct output
5

user output
5

Error:
checking 6, 7
6 7 1
6 7 2
6 7 3
found 3
checking 2, 5
2 5 1
found 1
checking 6, 6
6 6 1
6 6 2
found 2
checking 2, 8
2 8 1
2 8 2
found 2
checking 8, 3
8 3 1
8 3 2
found 2
checking 9, 6
9 6 1
9 6 2
9 6 3
9 6 4
9 6 5
found 5
checking 9, 2
9 2 1
9 2 2
found 2
checking 6, 3
6 3 1
6 3 2
found 2
checking 1, 3
1 3 1
1 3 2
1 3 3
1 3 4
found 4
checking 1, 2
1 2 1
1 2 2
1 2 3
found 3

Test 4

Group: 1, 2, 3, 4

Verdict: ACCEPTED

input
10 5
6 1
8 9
3 2
6 6
...

correct output
3

user output
3

Error:
checking 1, 2
1 2 1
found 1
checking 5, 5
5 5 1
5 5 2
found 2
checking 7, 3
7 3 1
7 3 2
7 3 3
found 3
checking 3, 4
3 4 1
found 1
checking 7, 5
7 5 1
7 5 2
found 2

Test 5

Group: 1, 2, 3, 4

Verdict: ACCEPTED

input
5 10
10 10
6 2
10 9
8 7
...

correct output
7

user output
7

Error:
checking 3, 2
3 2 1
3 2 2
3 2 3
found 3
checking 10, 3
10 3 1
10 3 2
10 3 3
10 3 4
10 3 5
found 5
checking 1, 7
1 7 1
1 7 2
1 7 3
1 7 4
1 7 5
1 7 6
1 7 7
found 7
checking 3, 10
3 10 1
3 10 2
3 10 3
3 10 4
3 10 5
3 10 6
3 10 7
found 7
checking 5, 7
5 7 1
5 7 2
5 7 3
found 3
checking 8, 1
8 1 1
8 1 2
8 1 3
found 3
checking 2, 6
2 6 1
2 6 2
2 6 3
2 6 4
2 6 5
found 5
checking 9, 4
9 4 1
9 4 2
9 4 3
9 4 4
found 4
checking 10, 7
10 7 1
10 7 2
found 2
checking 2, 4
2 4 1
2 4 2
2 4 3
2 4 4
2 4 5
2 4 6
found 6

Test 6

Group: 1, 2, 4

Verdict:

input
1 1
55 68
28 42

correct output
53

user output
(empty)

Test 7

Group: 1, 2, 4

Verdict: ACCEPTED

input
100 100
52 56
58 96
3 99
18 1
...

correct output
20

user output
20

Error:
checking 70, 26
70 26 1
70 26 2
70 26 3
70 26 4
70 26 5
found 5
checking 35, 33
35 33 1
35 33 2
35 33 3
35 33 4
35 33 5
35 33 6
35 33 7
35 33 8
35 33 9
35 33 10
35 33 11
35 33 12
found 12
checking 42, 51
42 51 1
42 51 2
42 51 3
42 51 4
42 51 5
42 51 6
42 51 7
42 51 8
found 8
checking 97, 53
97 53 1
found 1
checking 29, 97
29 97 1
29 97 2
29 97 3
found 3
checking 15, 97
15 97 1
15 97 2
15 97 3
15 97 4
15 97 5
15 97 6
found 6
checking 13, 98
13 98 1
13 98 2
13 98 3
13 98 4
13 98 5
found 5
checking 95, 20
95 20 1
95 20 2
95 20 3
95 20 4
95 20 5
95 20 6
95 20 7
95 20 8
95 20 9
95 20 10
95 20 11
95 20 12
found 12
checking 36, 53
36 53 1
36 53 2
36 53 3
36 53 4
36 53 5
36 53 6
36 53 7
36 53 8
36 53 9
36 53 10
found 10
checking 74, 38
74 38 1
74 38 2
74 38 3
74 38 4
found 4
checking 92, 93
92 93 1
92 93 2
92 93 3
92 93 4
92 93 5
92 93 6
92 93 7
92 93 8
found 8
checking 71, 83
71 83 1
71 83 2
found 2
checking 39, 60
39 60 1
39 60 2
39 60 3
39 60 4
39 60 5
39 60 6
39 60 7
39 60 8
39 60 9
39 60...

Test 8

Group: 1, 2, 3, 4

Verdict: ACCEPTED

input
1000 100
60 40
68 47
30 32
74 52
...

correct output
5

user output
5

Error:
checking 51, 96
51 96 1
51 96 2
51 96 3
found 3
checking 63, 15
63 15 1
63 15 2
found 2
checking 82, 88
82 88 1
82 88 2
found 2
checking 88, 9
88 9 1
88 9 2
88 9 3
found 3
checking 90, 43
90 43 1
90 43 2
90 43 3
found 3
checking 75, 4
75 4 1
found 1
checking 76, 7
76 7 1
76 7 2
76 7 3
found 3
checking 100, 96
100 96 1
100 96 2
100 96 3
found 3
checking 34, 89
34 89 1
found 1
checking 84, 100
84 100 1
84 100 2
found 2
checking 45, 44
45 44 1
45 44 2
45 44 3
found 3
checking 56, 5
56 5 1
56 5 2
found 2
checking 45, 17
45 17 1
45 17 2
45 17 3
found 3
checking 97, 93
97 93 1
found 1
checking 24, 9
24 9 1
24 9 2
found 2
checking 37, 13
37 13 1
37 13 2
37 13 3
37 13 4
found 4
checking 4, 31
4 31 1
4 31 2
4 31 3
found 3
checking 22, 72
22 72 1
found 1
checking 50, 67
50 67 1
50 67 2
50 67 3
found 3
checking 28, 82
28 82 1
found 1
checking 39, 56
39 56 1
found 1
checking 14, 28
14 28 1
found 1
checking 77, 75
77 75 1
found 1
checking 74, 62
74 62 1
found 1
checking 89, 40
89 40 1
89 40 2
found...

Test 9

Group: 1, 2, 4

Verdict: ACCEPTED

input
100 1000
44 26
18 81
18 6
83 90
...

correct output
20

user output
20

Error:
checking 84, 13
84 13 1
84 13 2
84 13 3
84 13 4
84 13 5
found 5
checking 49, 75
49 75 1
49 75 2
49 75 3
49 75 4
49 75 5
49 75 6
49 75 7
49 75 8
found 8
checking 10, 85
10 85 1
10 85 2
10 85 3
10 85 4
found 4
checking 89, 32
89 32 1
89 32 2
89 32 3
89 32 4
89 32 5
89 32 6
89 32 7
89 32 8
89 32 9
89 32 10
89 32 11
found 11
checking 54, 80
54 80 1
54 80 2
found 2
checking 96, 5
96 5 1
96 5 2
96 5 3
96 5 4
96 5 5
96 5 6
96 5 7
96 5 8
96 5 9
96 5 10
96 5 11
96 5 12
96 5 13
96 5 14
96 5 15
96 5 16
96 5 17
found 17
checking 23, 92
23 92 1
23 92 2
23 92 3
23 92 4
23 92 5
23 92 6
23 92 7
23 92 8
found 8
checking 48, 74
48 74 1
48 74 2
48 74 3
48 74 4
48 74 5
48 74 6
found 6
checking 17, 1
17 1 1
17 1 2
17 1 3
found 3
checking 23, 32
23 32 1
23 32 2
23 32 3
23 32 4
23 32 5
23 32 6
found 6
checking 93, 98
93 98 1
93 98 2
93 98 3
93 98 4
93 98 5
93 98 6
93 98 7
93 98 8
93 98 9
found 9
checking 93, 43
93 43 1
93 43 2
93 43 3
93 43 4
found 4
checking 84, 4
84 4 1
84 4 2
84 4 3
84 4 4
84 4 5
84 4 6
f...

Test 10

Group: 1, 2, 3, 4

Verdict: ACCEPTED

input
1000 1000
15 13
23 79
81 43
30 40
...

correct output
7

user output
7

Error:
checking 14, 5
14 5 1
found 1
checking 18, 60
18 60 1
18 60 2
18 60 3
18 60 4
18 60 5
18 60 6
found 6
checking 45, 49
45 49 1
found 1
checking 39, 6
39 6 1
39 6 2
39 6 3
found 3
checking 83, 78
83 78 1
found 1
checking 45, 92
45 92 1
45 92 2
45 92 3
found 3
checking 52, 68
52 68 1
52 68 2
52 68 3
52 68 4
found 4
checking 52, 13
52 13 1
52 13 2
found 2
checking 90, 87
90 87 1
found 1
checking 89, 32
89 32 1
89 32 2
89 32 3
89 32 4
found 4
checking 67, 36
67 36 1
found 1
checking 93, 23
93 23 1
found 1
checking 68, 38
68 38 1
found 1
checking 68, 2
68 2 1
found 1
checking 17, 59
17 59 1
17 59 2
17 59 3
17 59 4
found 4
checking 89, 50
89 50 1
found 1
checking 23, 61
23 61 1
23 61 2
23 61 3
found 3
checking 31, 5
31 5 1
31 5 2
31 5 3
found 3
checking 85, 7
85 7 1
found 1
checking 59, 60
59 60 1
59 60 2
59 60 3
found 3
checking 79, 13
79 13 1
79 13 2
found 2
checking 68, 35
68 35 1
found 1
checking 65, 4
65 4 1
65 4 2
65 4 3
65 4 4
found 4
checking 91, 31
91 31 1
91 31 2
91 31 3
91 31 4
91...

Test 11

Group: 1, 2, 4

Verdict:

input
1 1
948 495
227 149

correct output
1067

user output
(empty)

Test 12

Group: 1, 2, 4

Verdict:

input
100 100
114 530
748 841
612 709
810 232
...

correct output
203

user output
(empty)

Test 13

Group: 1, 2, 4

Verdict: ACCEPTED

input
1000 100
225 82
265 691
978 367
993 396
...

correct output
50

user output
50

Error:
checking 951, 450
951 450 1
951 450 2
951 450 3
951 450 4
951 450 5
951 450 6
951 450 7
951 450 8
951 450 9
951 450 10
951 450 11
951 450 12
951 450 13
951 450 14
951 450 15
951 450 16
951 450 17
found 17
checking 286, 290
286 290 1
286 290 2
286 290 3
286 290 4
286 290 5
286 290 6
286 290 7
286 290 8
286 290 9
286 290 10
286 290 11
286 290 12
286 290 13
286 290 14
286 290 15
286 290 16
286 290 17
286 290 18
286 290 19
286 290 20
286 290 21
286 290 22
286 290 23
286 290 24
286 290 25
286 290 26
286 290 27
286 290 28
286 290 29
286 290 30
286 290 31
286 290 32
found 32
checking 240, 753
240 753 1
240 753 2
240 753 3
240 753 4
240 753 5
240 753 6
240 753 7
240 753 8
240 753 9
240 753 10
240 753 11
found 11
checking 579, 182
579 182 1
579 182 2
579 182 3
579 182 4
579 182 5
579 182 6
579 182 7
579 182 8
579 182 9
579 182 10
579 182 11
579 182 12
579 182 13
579 182 14
579 182 15
579 182 16
579 182 17
579 182 18
579 182 19
579 182 20
found 20
checking 825, 571
825 571 1
825 571 2
825 571 3...

Test 14

Group: 1, 2, 4

Verdict:

input
100 1000
848 668
189 716
451 80
626 973
...

correct output
192

user output
(empty)

Test 15

Group: 1, 2, 4

Verdict:

input
1000 1000
931 656
382 809
666 609
1000 923
...

correct output
66

user output
(empty)

Test 16

Group: 2, 4

Verdict: ACCEPTED

input
10000 1000
961 158
561 313
991 125
821 964
...

correct output
18

user output
18

Error:
checking 880, 965
880 965 1
880 965 2
880 965 3
880 965 4
880 965 5
found 5
checking 493, 415
493 415 1
493 415 2
493 415 3
493 415 4
493 415 5
493 415 6
493 415 7
493 415 8
493 415 9
found 9
checking 722, 523
722 523 1
722 523 2
722 523 3
722 523 4
722 523 5
722 523 6
found 6
checking 582, 883
582 883 1
582 883 2
582 883 3
found 3
checking 475, 521
475 521 1
475 521 2
475 521 3
475 521 4
475 521 5
475 521 6
found 6
checking 600, 424
600 424 1
600 424 2
600 424 3
600 424 4
600 424 5
found 5
checking 794, 452
794 452 1
794 452 2
794 452 3
794 452 4
794 452 5
794 452 6
794 452 7
found 7
checking 226, 594
226 594 1
226 594 2
found 2
checking 617, 480
617 480 1
617 480 2
617 480 3
617 480 4
617 480 5
617 480 6
617 480 7
found 7
checking 478, 252
478 252 1
478 252 2
478 252 3
478 252 4
478 252 5
found 5
checking 340, 138
340 138 1
340 138 2
340 138 3
found 3
checking 750, 880
750 880 1
750 880 2
750 880 3
750 880 4
750 880 5
750 880 6
found 6
checking 298, 280
298 280 1
298 280 2
298 280 3...

Test 17

Group: 2, 4

Verdict:

input
1000 10000
428 1000
485 958
46 915
582 127
...

correct output
67

user output
(empty)

Test 18

Group: 2, 4

Verdict: ACCEPTED

input
10000 10000
503 849
367 829
448 926
362 512
...

correct output
22

user output
22

Error:
checking 763, 787
763 787 1
found 1
checking 410, 716
410 716 1
410 716 2
410 716 3
410 716 4
410 716 5
410 716 6
410 716 7
found 7
checking 865, 230
865 230 1
865 230 2
865 230 3
865 230 4
865 230 5
865 230 6
865 230 7
865 230 8
865 230 9
found 9
checking 831, 197
831 197 1
found 1
checking 493, 862
493 862 1
493 862 2
found 2
checking 58, 332
58 332 1
58 332 2
58 332 3
58 332 4
58 332 5
58 332 6
58 332 7
58 332 8
58 332 9
58 332 10
found 10
checking 182, 964
182 964 1
182 964 2
182 964 3
182 964 4
182 964 5
found 5
checking 947, 894
947 894 1
947 894 2
947 894 3
947 894 4
947 894 5
found 5
checking 940, 284
940 284 1
940 284 2
940 284 3
940 284 4
940 284 5
940 284 6
940 284 7
found 7
checking 320, 214
320 214 1
320 214 2
320 214 3
320 214 4
320 214 5
320 214 6
320 214 7
found 7
checking 698, 933
698 933 1
698 933 2
698 933 3
698 933 4
found 4
checking 171, 970
171 970 1
171 970 2
171 970 3
171 970 4
171 970 5
171 970 6
171 970 7
171 970 8
found 8
checking 384, 40
384 40 1
384 40 2
38...

Test 19

Group: 2, 3, 4

Verdict: ACCEPTED

input
100000 10000
111 705
808 24
69 858
961 122
...

correct output
7

user output
7

Error:
checking 174, 739
174 739 1
174 739 2
found 2
checking 720, 340
720 340 1
720 340 2
720 340 3
720 340 4
found 4
checking 116, 523
116 523 1
found 1
checking 159, 382
159 382 1
159 382 2
159 382 3
found 3
checking 596, 920
596 920 1
596 920 2
596 920 3
found 3
checking 821, 663
821 663 1
821 663 2
821 663 3
found 3
checking 55, 494
55 494 1
55 494 2
55 494 3
55 494 4
55 494 5
found 5
checking 191, 737
191 737 1
191 737 2
found 2
checking 336, 328
336 328 1
336 328 2
found 2
checking 950, 339
950 339 1
found 1
checking 655, 525
655 525 1
found 1
checking 329, 545
329 545 1
329 545 2
329 545 3
329 545 4
found 4
checking 103, 134
103 134 1
found 1
checking 359, 962
359 962 1
359 962 2
found 2
checking 143, 375
143 375 1
143 375 2
143 375 3
found 3
checking 295, 172
295 172 1
found 1
checking 253, 396
253 396 1
found 1
checking 672, 130
672 130 1
672 130 2
found 2
checking 463, 557
463 557 1
463 557 2
463 557 3
found 3
checking 768, 975
768 975 1
found 1
checking 442, 333
442 333 1
442 333...

Test 20

Group: 2, 4

Verdict:

input
10000 100000
844 874
339 315
819 918
627 936
...

correct output
27

user output
(empty)

Test 21

Group: 2, 3, 4

Verdict:

input
100000 100000
100 468
303 899
784 458
505 54
...

correct output
8

user output
(empty)

Test 22

Group: 1, 3, 4

Verdict: ACCEPTED

input
10 10
451219 220496
369161 161920
241139 700531
811276 993633
...

correct output
10

user output
10

Error:
checking 451225, 220495
451225 220495 1
451225 220495 2
451225 220495 3
451225 220495 4
451225 220495 5
451225 220495 6
451225 220495 7
found 7
checking 369165, 161924
369165 161924 1
369165 161924 2
369165 161924 3
369165 161924 4
369165 161924 5
369165 161924 6
369165 161924 7
369165 161924 8
found 8
checking 241133, 700533
241133 700533 1
241133 700533 2
241133 700533 3
241133 700533 4
241133 700533 5
241133 700533 6
241133 700533 7
241133 700533 8
found 8
checking 811278, 993627
811278 993627 1
811278 993627 2
811278 993627 3
811278 993627 4
811278 993627 5
811278 993627 6
811278 993627 7
811278 993627 8
found 8
checking 26006, 904529
26006 904529 1
26006 904529 2
26006 904529 3
26006 904529 4
26006 904529 5
26006 904529 6
26006 904529 7
found 7
checking 652068, 870160
652068 870160 1
652068 870160 2
found 2
checking 704327, 765364
704327 765364 1
704327 765364 2
704327 765364 3
704327 765364 4
704327 765364 5
704327 765364 6
704327 765364 7
704327 765364 8
found 8
checking 684571,...

Test 23

Group: 1, 3, 4

Verdict: ACCEPTED

input
1000 1000
337358 113599
674585 852084
717817 983395
895431 391144
...

correct output
10

user output
10

Error:
checking 337356, 113605
337356 113605 1
337356 113605 2
337356 113605 3
337356 113605 4
337356 113605 5
337356 113605 6
337356 113605 7
337356 113605 8
found 8
checking 674584, 852088
674584 852088 1
674584 852088 2
674584 852088 3
674584 852088 4
674584 852088 5
found 5
checking 717818, 983395
717818 983395 1
found 1
checking 895422, 391145
895422 391145 1
895422 391145 2
895422 391145 3
895422 391145 4
895422 391145 5
895422 391145 6
895422 391145 7
895422 391145 8
895422 391145 9
895422 391145 10
found 10
checking 751944, 744289
751944 744289 1
751944 744289 2
751944 744289 3
751944 744289 4
751944 744289 5
found 5
checking 375768, 899973
375768 899973 1
375768 899973 2
375768 899973 3
375768 899973 4
found 4
checking 191979, 991446
191979 991446 1
191979 991446 2
191979 991446 3
191979 991446 4
found 4
checking 218483, 115852
218483 115852 1
218483 115852 2
218483 115852 3
218483 115852 4
218483 115852 5
218483 115852 6
218483 115852 7
218483 115852 8
found 8
checking 392842, 34951...

Test 24

Group: 3, 4

Verdict: ACCEPTED

input
10000 10000
636432 664736
341727 37864
469264 360610
545785 879043
...

correct output
10

user output
10

Error:
checking 636425, 664735
636425 664735 1
636425 664735 2
636425 664735 3
636425 664735 4
636425 664735 5
636425 664735 6
636425 664735 7
636425 664735 8
found 8
checking 341722, 37864
341722 37864 1
341722 37864 2
341722 37864 3
341722 37864 4
341722 37864 5
found 5
checking 469263, 360608
469263 360608 1
469263 360608 2
469263 360608 3
found 3
checking 545790, 879045
545790 879045 1
545790 879045 2
545790 879045 3
545790 879045 4
545790 879045 5
545790 879045 6
545790 879045 7
found 7
checking 438230, 193564
438230 193564 1
438230 193564 2
438230 193564 3
438230 193564 4
438230 193564 5
438230 193564 6
438230 193564 7
438230 193564 8
438230 193564 9
found 9
checking 829273, 8542
829273 8542 1
829273 8542 2
829273 8542 3
829273 8542 4
829273 8542 5
829273 8542 6
829273 8542 7
829273 8542 8
829273 8542 9
found 9
checking 64873, 817019
64873 817019 1
64873 817019 2
64873 817019 3
64873 817019 4
64873 817019 5
found 5
checking 305884, 732628
305884 732628 1
found 1
checking 416253, 817480...

Test 25

Group: 3, 4

Verdict:

input
100000 100000
750315 55215
550921 465416
435380 742666
288479 495099
...

correct output
7

user output
(empty)

Test 26

Group: 3, 4

Verdict:

input
100000 100000
416825 677767
347155 162523
602643 936386
181956 517732
...

correct output
8

user output
(empty)

Test 27

Group: 3, 4

Verdict:

input
100000 100000
155202 457283
421100 55104
604625 136495
841749 569346
...

correct output
9

user output
(empty)

Test 28

Group: 3, 4

Verdict:

input
100000 100000
290146 808578
489810 268578
956361 635214
939844 534435
...

correct output
10

user output
(empty)

Test 29

Group: 1, 4

Verdict:

input
10 10
668880 791821
226050 188133
859493 736633
290460 838926
...

correct output
342068

user output
(empty)

Test 30

Group: 1, 4

Verdict:

input
100 100
729367 697755
338457 742774
535371 701216
93743 555995
...

correct output
285526

user output
(empty)

Test 31

Group: 1, 4

Verdict:

input
100 1000
50870 539657
476809 462765
311713 355546
901838 829393
...

correct output
255789

user output
(empty)

Test 32

Group: 1, 4

Verdict:

input
1000 100
182415 659794
581623 510256
594984 525993
367726 938015
...

correct output
50501

user output
(empty)

Test 33

Group: 1, 4

Verdict:

input
1000 1000
668976 422918
350791 933024
893307 88057
278098 13847
...

correct output
57897

user output
(empty)

Test 34

Group: 1, 4

Verdict:

input
1000 1000
701742 116334
278337 368995
187245 133297
273083 369187
...

correct output
60537

user output
(empty)

Test 35

Group: 1, 4

Verdict:

input
10 10
693836 74759
61731 520849
666762 45364
559335 979511
...

correct output
417182

user output
(empty)

Test 36

Group: 1, 4

Verdict:

input
1000 1000
207572 43521
513003 683552
58800 253576
16541 558695
...

correct output
69609

user output
(empty)

Test 37

Group: 4

Verdict:

input
10000 10000
89066 605574
504488 66068
959128 348414
68004 849599
...

correct output
22936

user output
(empty)

Test 38

Group: 4

Verdict:

input
100000 100000
20824 214259
463783 904059
603615 769692
789080 399093
...

correct output
8070

user output
(empty)

Test 39

Group: 4

Verdict:

input
100000 100000
811424 464350
336948 946495
204883 914446
171888 431769
...

correct output
8240

user output
(empty)

Test 40

Group: 4

Verdict:

input
100000 100000
850810 902354
292608 63461
223139 188900
197760 995048
...

correct output
7769

user output
(empty)

Test 41

Group: 4

Verdict:

input
100000 100000
1 1
1 2
1 3
1 4
...

correct output
1899999

user output
(empty)

Error:
checking 1000000, 1000000
1000000 1000000 1
1000000 1000000 2
1000000 1000000 3
1000000 1000000 4
1000000 1000000 5
1000000 1000000 6
1000000 1000000 7
1000000 1000000 8
1000000 1000000 9
1000000 1000000 10
1000000 1000000 11
1000000 1000000 12
1000000 1000000 13
1000000 1000000 14
1000000 1000000 15
1000000 1000000 16
1000000 1000000 17
1000000 1000000 18