init
This commit is contained in:
80
Html/books/code_tests/binary_search/agent-twice_split_0.in
Normal file
80
Html/books/code_tests/binary_search/agent-twice_split_0.in
Normal file
@@ -0,0 +1,80 @@
|
||||
3
|
||||
2166 9133 9705
|
||||
77
|
||||
2166
|
||||
9133
|
||||
9705
|
||||
9705
|
||||
9705
|
||||
9133
|
||||
9705
|
||||
2414
|
||||
9133
|
||||
9133
|
||||
9133
|
||||
2166
|
||||
2166
|
||||
2166
|
||||
9705
|
||||
9705
|
||||
9133
|
||||
9705
|
||||
9133
|
||||
2166
|
||||
9133
|
||||
9705
|
||||
7742
|
||||
9133
|
||||
2166
|
||||
2166
|
||||
9133
|
||||
9133
|
||||
9133
|
||||
9705
|
||||
9705
|
||||
2166
|
||||
9705
|
||||
5718
|
||||
2166
|
||||
9705
|
||||
9705
|
||||
2166
|
||||
2166
|
||||
9705
|
||||
9133
|
||||
4154
|
||||
9705
|
||||
9133
|
||||
2166
|
||||
4098
|
||||
9705
|
||||
9133
|
||||
9705
|
||||
9705
|
||||
3893
|
||||
9705
|
||||
2166
|
||||
9705
|
||||
2166
|
||||
9705
|
||||
9705
|
||||
9705
|
||||
2166
|
||||
2565
|
||||
9133
|
||||
9133
|
||||
9705
|
||||
2166
|
||||
2166
|
||||
2450
|
||||
2166
|
||||
2166
|
||||
9705
|
||||
2166
|
||||
8961
|
||||
6674
|
||||
9705
|
||||
9705
|
||||
2166
|
||||
9133
|
||||
8667
|
||||
77
Html/books/code_tests/binary_search/agent-twice_split_0.out
Normal file
77
Html/books/code_tests/binary_search/agent-twice_split_0.out
Normal file
@@ -0,0 +1,77 @@
|
||||
0
|
||||
1
|
||||
2
|
||||
2
|
||||
2
|
||||
1
|
||||
2
|
||||
-1
|
||||
1
|
||||
1
|
||||
1
|
||||
0
|
||||
0
|
||||
0
|
||||
2
|
||||
2
|
||||
1
|
||||
2
|
||||
1
|
||||
0
|
||||
1
|
||||
2
|
||||
-1
|
||||
1
|
||||
0
|
||||
0
|
||||
1
|
||||
1
|
||||
1
|
||||
2
|
||||
2
|
||||
0
|
||||
2
|
||||
-1
|
||||
0
|
||||
2
|
||||
2
|
||||
0
|
||||
0
|
||||
2
|
||||
1
|
||||
-1
|
||||
2
|
||||
1
|
||||
0
|
||||
-1
|
||||
2
|
||||
1
|
||||
2
|
||||
2
|
||||
-1
|
||||
2
|
||||
0
|
||||
2
|
||||
0
|
||||
2
|
||||
2
|
||||
2
|
||||
0
|
||||
-1
|
||||
1
|
||||
1
|
||||
2
|
||||
0
|
||||
0
|
||||
-1
|
||||
0
|
||||
0
|
||||
2
|
||||
0
|
||||
-1
|
||||
-1
|
||||
2
|
||||
2
|
||||
0
|
||||
1
|
||||
-1
|
||||
75
Html/books/code_tests/binary_search/agent-twice_split_1.in
Normal file
75
Html/books/code_tests/binary_search/agent-twice_split_1.in
Normal file
@@ -0,0 +1,75 @@
|
||||
30
|
||||
581 603 793 1313 2185 2257 2556 2572 2804 2938 3253 3687 4057 4124 4348 4889 5010 5406 5586 5604 5615 5680 6057 6076 6342 6613 7120 7756 8662 9557
|
||||
72
|
||||
7756
|
||||
8662
|
||||
1431
|
||||
5615
|
||||
5615
|
||||
8662
|
||||
2572
|
||||
6235
|
||||
581
|
||||
5586
|
||||
2752
|
||||
793
|
||||
5604
|
||||
6057
|
||||
4348
|
||||
2556
|
||||
4124
|
||||
6057
|
||||
6397
|
||||
1313
|
||||
5680
|
||||
2804
|
||||
3687
|
||||
7120
|
||||
7756
|
||||
793
|
||||
6613
|
||||
6076
|
||||
5604
|
||||
2556
|
||||
6076
|
||||
9983
|
||||
3253
|
||||
7120
|
||||
7120
|
||||
4348
|
||||
581
|
||||
2257
|
||||
793
|
||||
5680
|
||||
5010
|
||||
2257
|
||||
5406
|
||||
4348
|
||||
7120
|
||||
1313
|
||||
8662
|
||||
793
|
||||
4348
|
||||
5615
|
||||
7756
|
||||
7756
|
||||
6613
|
||||
9557
|
||||
5010
|
||||
3253
|
||||
2938
|
||||
6076
|
||||
581
|
||||
6342
|
||||
6076
|
||||
6342
|
||||
1313
|
||||
4057
|
||||
160
|
||||
5604
|
||||
2938
|
||||
6057
|
||||
3253
|
||||
4057
|
||||
7826
|
||||
7120
|
||||
72
Html/books/code_tests/binary_search/agent-twice_split_1.out
Normal file
72
Html/books/code_tests/binary_search/agent-twice_split_1.out
Normal file
@@ -0,0 +1,72 @@
|
||||
27
|
||||
28
|
||||
-1
|
||||
20
|
||||
20
|
||||
28
|
||||
7
|
||||
-1
|
||||
0
|
||||
18
|
||||
-1
|
||||
2
|
||||
19
|
||||
22
|
||||
14
|
||||
6
|
||||
13
|
||||
22
|
||||
-1
|
||||
3
|
||||
21
|
||||
8
|
||||
11
|
||||
26
|
||||
27
|
||||
2
|
||||
25
|
||||
23
|
||||
19
|
||||
6
|
||||
23
|
||||
-1
|
||||
10
|
||||
26
|
||||
26
|
||||
14
|
||||
0
|
||||
5
|
||||
2
|
||||
21
|
||||
16
|
||||
5
|
||||
17
|
||||
14
|
||||
26
|
||||
3
|
||||
28
|
||||
2
|
||||
14
|
||||
20
|
||||
27
|
||||
27
|
||||
25
|
||||
29
|
||||
16
|
||||
10
|
||||
9
|
||||
23
|
||||
0
|
||||
24
|
||||
23
|
||||
24
|
||||
3
|
||||
12
|
||||
-1
|
||||
19
|
||||
9
|
||||
22
|
||||
10
|
||||
12
|
||||
-1
|
||||
26
|
||||
70
Html/books/code_tests/binary_search/agent-twice_split_10.in
Normal file
70
Html/books/code_tests/binary_search/agent-twice_split_10.in
Normal file
@@ -0,0 +1,70 @@
|
||||
63
|
||||
617 657 668 728 989 1075 1461 1577 1731 2677 2688 2880 2901 3009 3086 3200 3445 3466 3491 3555 3567 3602 3617 3633 3885 3894 4135 4314 4669 4831 4835 4883 5009 5031 5041 5076 5097 5327 5451 5698 5720 6147 6176 6411 6614 6732 6803 6865 7092 7510 7925 8211 8523 8584 8588 9105 9418 9543 9585 9822 9870 9894 9909
|
||||
67
|
||||
6865
|
||||
5009
|
||||
5042
|
||||
617
|
||||
9870
|
||||
9822
|
||||
7510
|
||||
3609
|
||||
3555
|
||||
5451
|
||||
2880
|
||||
9894
|
||||
9870
|
||||
657
|
||||
7925
|
||||
9822
|
||||
728
|
||||
3086
|
||||
9585
|
||||
5720
|
||||
1577
|
||||
6803
|
||||
5009
|
||||
5327
|
||||
3555
|
||||
4472
|
||||
3602
|
||||
8523
|
||||
3466
|
||||
6803
|
||||
9894
|
||||
989
|
||||
3602
|
||||
6614
|
||||
9870
|
||||
8211
|
||||
5720
|
||||
3086
|
||||
3567
|
||||
9894
|
||||
9909
|
||||
5009
|
||||
3491
|
||||
9105
|
||||
617
|
||||
3864
|
||||
5076
|
||||
6147
|
||||
5720
|
||||
6176
|
||||
6176
|
||||
7092
|
||||
3617
|
||||
2688
|
||||
2473
|
||||
6147
|
||||
580
|
||||
3894
|
||||
3086
|
||||
3633
|
||||
8584
|
||||
5698
|
||||
3491
|
||||
6614
|
||||
6176
|
||||
668
|
||||
7888
|
||||
67
Html/books/code_tests/binary_search/agent-twice_split_10.out
Normal file
67
Html/books/code_tests/binary_search/agent-twice_split_10.out
Normal file
@@ -0,0 +1,67 @@
|
||||
47
|
||||
32
|
||||
-1
|
||||
0
|
||||
60
|
||||
59
|
||||
49
|
||||
-1
|
||||
19
|
||||
38
|
||||
11
|
||||
61
|
||||
60
|
||||
1
|
||||
50
|
||||
59
|
||||
3
|
||||
14
|
||||
58
|
||||
40
|
||||
7
|
||||
46
|
||||
32
|
||||
37
|
||||
19
|
||||
-1
|
||||
21
|
||||
52
|
||||
17
|
||||
46
|
||||
61
|
||||
4
|
||||
21
|
||||
44
|
||||
60
|
||||
51
|
||||
40
|
||||
14
|
||||
20
|
||||
61
|
||||
62
|
||||
32
|
||||
18
|
||||
55
|
||||
0
|
||||
-1
|
||||
35
|
||||
41
|
||||
40
|
||||
42
|
||||
42
|
||||
48
|
||||
22
|
||||
10
|
||||
-1
|
||||
41
|
||||
-1
|
||||
25
|
||||
14
|
||||
23
|
||||
53
|
||||
39
|
||||
18
|
||||
44
|
||||
42
|
||||
2
|
||||
-1
|
||||
66
Html/books/code_tests/binary_search/agent-twice_split_11.in
Normal file
66
Html/books/code_tests/binary_search/agent-twice_split_11.in
Normal file
@@ -0,0 +1,66 @@
|
||||
8
|
||||
488 1515 2200 4293 5232 5698 5935 6032
|
||||
63
|
||||
488
|
||||
6032
|
||||
1110
|
||||
5935
|
||||
488
|
||||
5698
|
||||
1515
|
||||
2200
|
||||
488
|
||||
6032
|
||||
5193
|
||||
1515
|
||||
5935
|
||||
5935
|
||||
1515
|
||||
488
|
||||
2200
|
||||
6032
|
||||
5232
|
||||
1515
|
||||
6032
|
||||
2200
|
||||
488
|
||||
1515
|
||||
5698
|
||||
5935
|
||||
5698
|
||||
6032
|
||||
1515
|
||||
5698
|
||||
5935
|
||||
2200
|
||||
5935
|
||||
5232
|
||||
6032
|
||||
2200
|
||||
2200
|
||||
5232
|
||||
5232
|
||||
5698
|
||||
488
|
||||
2200
|
||||
1515
|
||||
2200
|
||||
5698
|
||||
5232
|
||||
488
|
||||
4293
|
||||
5232
|
||||
4672
|
||||
6032
|
||||
1515
|
||||
488
|
||||
5232
|
||||
4293
|
||||
488
|
||||
1515
|
||||
5935
|
||||
6032
|
||||
2200
|
||||
5935
|
||||
2640
|
||||
5935
|
||||
63
Html/books/code_tests/binary_search/agent-twice_split_11.out
Normal file
63
Html/books/code_tests/binary_search/agent-twice_split_11.out
Normal file
@@ -0,0 +1,63 @@
|
||||
0
|
||||
7
|
||||
-1
|
||||
6
|
||||
0
|
||||
5
|
||||
1
|
||||
2
|
||||
0
|
||||
7
|
||||
-1
|
||||
1
|
||||
6
|
||||
6
|
||||
1
|
||||
0
|
||||
2
|
||||
7
|
||||
4
|
||||
1
|
||||
7
|
||||
2
|
||||
0
|
||||
1
|
||||
5
|
||||
6
|
||||
5
|
||||
7
|
||||
1
|
||||
5
|
||||
6
|
||||
2
|
||||
6
|
||||
4
|
||||
7
|
||||
2
|
||||
2
|
||||
4
|
||||
4
|
||||
5
|
||||
0
|
||||
2
|
||||
1
|
||||
2
|
||||
5
|
||||
4
|
||||
0
|
||||
3
|
||||
4
|
||||
-1
|
||||
7
|
||||
1
|
||||
0
|
||||
4
|
||||
3
|
||||
0
|
||||
1
|
||||
6
|
||||
7
|
||||
2
|
||||
6
|
||||
-1
|
||||
6
|
||||
47
Html/books/code_tests/binary_search/agent-twice_split_12.in
Normal file
47
Html/books/code_tests/binary_search/agent-twice_split_12.in
Normal file
@@ -0,0 +1,47 @@
|
||||
19
|
||||
50 316 497 2917 3296 3720 3916 5160 5841 6514 7195 7366 7621 7985 7997 8083 8273 9783 9990
|
||||
44
|
||||
7985
|
||||
5160
|
||||
7195
|
||||
3916
|
||||
7985
|
||||
7366
|
||||
2229
|
||||
2917
|
||||
7621
|
||||
7985
|
||||
2030
|
||||
5160
|
||||
6105
|
||||
6514
|
||||
9783
|
||||
3720
|
||||
8273
|
||||
316
|
||||
7621
|
||||
8083
|
||||
8273
|
||||
3916
|
||||
316
|
||||
9060
|
||||
5160
|
||||
5160
|
||||
7621
|
||||
3916
|
||||
7985
|
||||
9783
|
||||
3296
|
||||
3132
|
||||
7985
|
||||
7997
|
||||
50
|
||||
7621
|
||||
7985
|
||||
3296
|
||||
497
|
||||
8083
|
||||
5841
|
||||
316
|
||||
7985
|
||||
3916
|
||||
44
Html/books/code_tests/binary_search/agent-twice_split_12.out
Normal file
44
Html/books/code_tests/binary_search/agent-twice_split_12.out
Normal file
@@ -0,0 +1,44 @@
|
||||
13
|
||||
7
|
||||
10
|
||||
6
|
||||
13
|
||||
11
|
||||
-1
|
||||
3
|
||||
12
|
||||
13
|
||||
-1
|
||||
7
|
||||
-1
|
||||
9
|
||||
17
|
||||
5
|
||||
16
|
||||
1
|
||||
12
|
||||
15
|
||||
16
|
||||
6
|
||||
1
|
||||
-1
|
||||
7
|
||||
7
|
||||
12
|
||||
6
|
||||
13
|
||||
17
|
||||
4
|
||||
-1
|
||||
13
|
||||
14
|
||||
0
|
||||
12
|
||||
13
|
||||
4
|
||||
2
|
||||
15
|
||||
8
|
||||
1
|
||||
13
|
||||
6
|
||||
98
Html/books/code_tests/binary_search/agent-twice_split_13.in
Normal file
98
Html/books/code_tests/binary_search/agent-twice_split_13.in
Normal file
@@ -0,0 +1,98 @@
|
||||
83
|
||||
301 548 597 641 690 961 972 1275 1713 1859 1930 2202 2231 2264 2379 2495 2531 2767 2804 2840 2896 3115 3207 3282 3507 3552 3866 3895 4017 4071 4298 4357 4635 4726 4867 5014 5080 5100 5116 5271 5325 5339 5544 5555 5593 5612 5642 5659 5914 6164 6398 6480 6773 6869 6976 7097 7109 7139 7180 7341 7664 7910 7924 8071 8107 8160 8351 8742 8773 8828 8840 9095 9120 9170 9229 9248 9401 9403 9536 9608 9638 9651 9912
|
||||
95
|
||||
8160
|
||||
9401
|
||||
548
|
||||
3895
|
||||
8840
|
||||
8828
|
||||
9608
|
||||
8840
|
||||
6869
|
||||
9651
|
||||
7447
|
||||
8925
|
||||
6773
|
||||
3207
|
||||
972
|
||||
9403
|
||||
548
|
||||
5612
|
||||
5325
|
||||
6480
|
||||
5659
|
||||
4357
|
||||
9401
|
||||
9473
|
||||
5544
|
||||
3840
|
||||
8742
|
||||
6164
|
||||
5555
|
||||
5014
|
||||
1823
|
||||
5325
|
||||
9748
|
||||
4357
|
||||
9474
|
||||
7097
|
||||
7274
|
||||
2264
|
||||
9248
|
||||
7097
|
||||
9608
|
||||
1930
|
||||
5612
|
||||
3282
|
||||
961
|
||||
4867
|
||||
2896
|
||||
5339
|
||||
5116
|
||||
2767
|
||||
6719
|
||||
4017
|
||||
972
|
||||
8742
|
||||
3552
|
||||
9479
|
||||
8828
|
||||
690
|
||||
8071
|
||||
641
|
||||
548
|
||||
2379
|
||||
4017
|
||||
7664
|
||||
9638
|
||||
641
|
||||
5914
|
||||
8828
|
||||
2202
|
||||
9912
|
||||
1930
|
||||
301
|
||||
8071
|
||||
6398
|
||||
5271
|
||||
4192
|
||||
690
|
||||
9608
|
||||
548
|
||||
5271
|
||||
5271
|
||||
5642
|
||||
972
|
||||
6976
|
||||
1859
|
||||
5271
|
||||
2767
|
||||
970
|
||||
3507
|
||||
8742
|
||||
2264
|
||||
5612
|
||||
9651
|
||||
548
|
||||
7097
|
||||
95
Html/books/code_tests/binary_search/agent-twice_split_13.out
Normal file
95
Html/books/code_tests/binary_search/agent-twice_split_13.out
Normal file
@@ -0,0 +1,95 @@
|
||||
65
|
||||
76
|
||||
1
|
||||
27
|
||||
70
|
||||
69
|
||||
79
|
||||
70
|
||||
53
|
||||
81
|
||||
-1
|
||||
-1
|
||||
52
|
||||
22
|
||||
6
|
||||
77
|
||||
1
|
||||
45
|
||||
40
|
||||
51
|
||||
47
|
||||
31
|
||||
76
|
||||
-1
|
||||
42
|
||||
-1
|
||||
67
|
||||
49
|
||||
43
|
||||
35
|
||||
-1
|
||||
40
|
||||
-1
|
||||
31
|
||||
-1
|
||||
55
|
||||
-1
|
||||
13
|
||||
75
|
||||
55
|
||||
79
|
||||
10
|
||||
45
|
||||
23
|
||||
5
|
||||
34
|
||||
20
|
||||
41
|
||||
38
|
||||
17
|
||||
-1
|
||||
28
|
||||
6
|
||||
67
|
||||
25
|
||||
-1
|
||||
69
|
||||
4
|
||||
63
|
||||
3
|
||||
1
|
||||
14
|
||||
28
|
||||
60
|
||||
80
|
||||
3
|
||||
48
|
||||
69
|
||||
11
|
||||
82
|
||||
10
|
||||
0
|
||||
63
|
||||
50
|
||||
39
|
||||
-1
|
||||
4
|
||||
79
|
||||
1
|
||||
39
|
||||
39
|
||||
46
|
||||
6
|
||||
54
|
||||
9
|
||||
39
|
||||
17
|
||||
-1
|
||||
24
|
||||
67
|
||||
13
|
||||
45
|
||||
81
|
||||
1
|
||||
55
|
||||
72
Html/books/code_tests/binary_search/agent-twice_split_14.in
Normal file
72
Html/books/code_tests/binary_search/agent-twice_split_14.in
Normal file
@@ -0,0 +1,72 @@
|
||||
25
|
||||
173 495 669 1183 1730 1979 2147 3005 3249 3336 3551 4039 4081 4728 4766 5066 5767 6458 7516 7776 7785 8199 8222 8245 9680
|
||||
69
|
||||
4728
|
||||
173
|
||||
3249
|
||||
9565
|
||||
1979
|
||||
3249
|
||||
1183
|
||||
4081
|
||||
7884
|
||||
1730
|
||||
4081
|
||||
8115
|
||||
3249
|
||||
4766
|
||||
3249
|
||||
9680
|
||||
7516
|
||||
495
|
||||
4728
|
||||
3734
|
||||
8425
|
||||
4728
|
||||
6458
|
||||
9680
|
||||
4039
|
||||
3912
|
||||
7785
|
||||
1183
|
||||
173
|
||||
2147
|
||||
9680
|
||||
2147
|
||||
7785
|
||||
2147
|
||||
4728
|
||||
669
|
||||
3264
|
||||
3551
|
||||
3249
|
||||
4039
|
||||
5066
|
||||
6779
|
||||
3249
|
||||
3005
|
||||
173
|
||||
4081
|
||||
7776
|
||||
5767
|
||||
4039
|
||||
5767
|
||||
5066
|
||||
4728
|
||||
173
|
||||
1730
|
||||
9680
|
||||
8199
|
||||
3005
|
||||
7516
|
||||
9680
|
||||
8199
|
||||
8222
|
||||
8245
|
||||
1979
|
||||
3551
|
||||
2147
|
||||
5767
|
||||
8222
|
||||
8222
|
||||
2147
|
||||
69
Html/books/code_tests/binary_search/agent-twice_split_14.out
Normal file
69
Html/books/code_tests/binary_search/agent-twice_split_14.out
Normal file
@@ -0,0 +1,69 @@
|
||||
13
|
||||
0
|
||||
8
|
||||
-1
|
||||
5
|
||||
8
|
||||
3
|
||||
12
|
||||
-1
|
||||
4
|
||||
12
|
||||
-1
|
||||
8
|
||||
14
|
||||
8
|
||||
24
|
||||
18
|
||||
1
|
||||
13
|
||||
-1
|
||||
-1
|
||||
13
|
||||
17
|
||||
24
|
||||
11
|
||||
-1
|
||||
20
|
||||
3
|
||||
0
|
||||
6
|
||||
24
|
||||
6
|
||||
20
|
||||
6
|
||||
13
|
||||
2
|
||||
-1
|
||||
10
|
||||
8
|
||||
11
|
||||
15
|
||||
-1
|
||||
8
|
||||
7
|
||||
0
|
||||
12
|
||||
19
|
||||
16
|
||||
11
|
||||
16
|
||||
15
|
||||
13
|
||||
0
|
||||
4
|
||||
24
|
||||
21
|
||||
7
|
||||
18
|
||||
24
|
||||
21
|
||||
22
|
||||
23
|
||||
5
|
||||
10
|
||||
6
|
||||
16
|
||||
22
|
||||
22
|
||||
6
|
||||
67
Html/books/code_tests/binary_search/agent-twice_split_15.in
Normal file
67
Html/books/code_tests/binary_search/agent-twice_split_15.in
Normal file
@@ -0,0 +1,67 @@
|
||||
39
|
||||
9 518 886 1485 1585 1829 1971 2271 2371 2427 2528 2932 3066 3476 3527 3806 4203 4215 4430 4519 4786 4897 4938 5151 5733 6870 7008 7127 7238 7415 8011 8347 8441 8701 9034 9050 9453 9910 9931
|
||||
64
|
||||
3527
|
||||
2427
|
||||
1971
|
||||
1829
|
||||
2932
|
||||
2932
|
||||
8114
|
||||
7415
|
||||
1585
|
||||
3476
|
||||
8347
|
||||
9453
|
||||
6870
|
||||
3066
|
||||
2427
|
||||
9910
|
||||
3066
|
||||
8011
|
||||
8701
|
||||
9453
|
||||
4897
|
||||
5733
|
||||
1829
|
||||
3806
|
||||
4786
|
||||
1485
|
||||
2528
|
||||
9910
|
||||
7415
|
||||
9931
|
||||
518
|
||||
518
|
||||
3476
|
||||
2932
|
||||
5733
|
||||
2271
|
||||
9050
|
||||
9
|
||||
4430
|
||||
886
|
||||
3476
|
||||
7238
|
||||
4519
|
||||
7054
|
||||
1829
|
||||
2271
|
||||
3066
|
||||
9050
|
||||
2371
|
||||
9034
|
||||
8011
|
||||
2932
|
||||
4519
|
||||
7415
|
||||
3066
|
||||
9050
|
||||
9050
|
||||
1485
|
||||
8441
|
||||
9093
|
||||
4938
|
||||
9453
|
||||
8347
|
||||
2371
|
||||
64
Html/books/code_tests/binary_search/agent-twice_split_15.out
Normal file
64
Html/books/code_tests/binary_search/agent-twice_split_15.out
Normal file
@@ -0,0 +1,64 @@
|
||||
14
|
||||
9
|
||||
6
|
||||
5
|
||||
11
|
||||
11
|
||||
-1
|
||||
29
|
||||
4
|
||||
13
|
||||
31
|
||||
36
|
||||
25
|
||||
12
|
||||
9
|
||||
37
|
||||
12
|
||||
30
|
||||
33
|
||||
36
|
||||
21
|
||||
24
|
||||
5
|
||||
15
|
||||
20
|
||||
3
|
||||
10
|
||||
37
|
||||
29
|
||||
38
|
||||
1
|
||||
1
|
||||
13
|
||||
11
|
||||
24
|
||||
7
|
||||
35
|
||||
0
|
||||
18
|
||||
2
|
||||
13
|
||||
28
|
||||
19
|
||||
-1
|
||||
5
|
||||
7
|
||||
12
|
||||
35
|
||||
8
|
||||
34
|
||||
30
|
||||
11
|
||||
19
|
||||
29
|
||||
12
|
||||
35
|
||||
35
|
||||
3
|
||||
32
|
||||
-1
|
||||
22
|
||||
36
|
||||
31
|
||||
8
|
||||
27
Html/books/code_tests/binary_search/agent-twice_split_16.in
Normal file
27
Html/books/code_tests/binary_search/agent-twice_split_16.in
Normal file
@@ -0,0 +1,27 @@
|
||||
56
|
||||
208 213 1004 1459 1480 1705 1753 1866 1900 2029 2116 2603 2679 2913 3272 3312 3492 3805 3896 3938 4089 4270 4293 4531 4589 4707 4746 4821 4835 4853 4870 4939 4996 5013 5036 5339 5659 6143 6182 6248 6406 6652 7017 7154 7702 7740 8065 8309 8330 8353 9075 9260 9409 9430 9477 9534
|
||||
24
|
||||
3938
|
||||
4270
|
||||
1705
|
||||
3312
|
||||
6406
|
||||
8309
|
||||
2029
|
||||
1705
|
||||
213
|
||||
5952
|
||||
3312
|
||||
1480
|
||||
4821
|
||||
208
|
||||
3938
|
||||
4293
|
||||
9430
|
||||
4589
|
||||
5013
|
||||
4707
|
||||
2029
|
||||
4531
|
||||
5659
|
||||
1004
|
||||
24
Html/books/code_tests/binary_search/agent-twice_split_16.out
Normal file
24
Html/books/code_tests/binary_search/agent-twice_split_16.out
Normal file
@@ -0,0 +1,24 @@
|
||||
19
|
||||
21
|
||||
5
|
||||
15
|
||||
40
|
||||
47
|
||||
9
|
||||
5
|
||||
1
|
||||
-1
|
||||
15
|
||||
4
|
||||
27
|
||||
0
|
||||
19
|
||||
22
|
||||
53
|
||||
24
|
||||
33
|
||||
25
|
||||
9
|
||||
23
|
||||
36
|
||||
2
|
||||
76
Html/books/code_tests/binary_search/agent-twice_split_17.in
Normal file
76
Html/books/code_tests/binary_search/agent-twice_split_17.in
Normal file
@@ -0,0 +1,76 @@
|
||||
54
|
||||
132 345 359 430 534 561 691 971 1070 1251 1586 1681 1954 2300 2482 2635 2690 2810 2883 2967 3018 3123 3418 4425 4840 4990 5007 5069 5359 5825 5892 6034 6471 6472 6668 6868 6996 7023 7284 7427 7445 7459 7562 7631 7662 8144 8407 8516 8611 8710 8964 8966 9206 9577
|
||||
73
|
||||
7427
|
||||
8003
|
||||
7445
|
||||
2810
|
||||
7562
|
||||
8516
|
||||
7459
|
||||
6472
|
||||
4425
|
||||
7631
|
||||
8710
|
||||
7445
|
||||
1954
|
||||
1586
|
||||
7631
|
||||
8964
|
||||
7284
|
||||
3418
|
||||
4990
|
||||
8611
|
||||
2967
|
||||
7459
|
||||
8407
|
||||
971
|
||||
8611
|
||||
7671
|
||||
1681
|
||||
3018
|
||||
1586
|
||||
4814
|
||||
6034
|
||||
359
|
||||
67
|
||||
2810
|
||||
971
|
||||
122
|
||||
8964
|
||||
4840
|
||||
971
|
||||
4776
|
||||
2967
|
||||
6034
|
||||
569
|
||||
561
|
||||
561
|
||||
8964
|
||||
8966
|
||||
3418
|
||||
2883
|
||||
6472
|
||||
4840
|
||||
8390
|
||||
6472
|
||||
8516
|
||||
6471
|
||||
2635
|
||||
691
|
||||
9577
|
||||
1892
|
||||
3018
|
||||
2810
|
||||
534
|
||||
6472
|
||||
1160
|
||||
7562
|
||||
6471
|
||||
8964
|
||||
2178
|
||||
5825
|
||||
8964
|
||||
5825
|
||||
6996
|
||||
132
|
||||
73
Html/books/code_tests/binary_search/agent-twice_split_17.out
Normal file
73
Html/books/code_tests/binary_search/agent-twice_split_17.out
Normal file
@@ -0,0 +1,73 @@
|
||||
39
|
||||
-1
|
||||
40
|
||||
17
|
||||
42
|
||||
47
|
||||
41
|
||||
33
|
||||
23
|
||||
43
|
||||
49
|
||||
40
|
||||
12
|
||||
10
|
||||
43
|
||||
50
|
||||
38
|
||||
22
|
||||
25
|
||||
48
|
||||
19
|
||||
41
|
||||
46
|
||||
7
|
||||
48
|
||||
-1
|
||||
11
|
||||
20
|
||||
10
|
||||
-1
|
||||
31
|
||||
2
|
||||
-1
|
||||
17
|
||||
7
|
||||
-1
|
||||
50
|
||||
24
|
||||
7
|
||||
-1
|
||||
19
|
||||
31
|
||||
-1
|
||||
5
|
||||
5
|
||||
50
|
||||
51
|
||||
22
|
||||
18
|
||||
33
|
||||
24
|
||||
-1
|
||||
33
|
||||
47
|
||||
32
|
||||
15
|
||||
6
|
||||
53
|
||||
-1
|
||||
20
|
||||
17
|
||||
4
|
||||
33
|
||||
-1
|
||||
42
|
||||
32
|
||||
50
|
||||
-1
|
||||
29
|
||||
50
|
||||
29
|
||||
36
|
||||
0
|
||||
39
Html/books/code_tests/binary_search/agent-twice_split_18.in
Normal file
39
Html/books/code_tests/binary_search/agent-twice_split_18.in
Normal file
@@ -0,0 +1,39 @@
|
||||
71
|
||||
219 273 1138 1185 1292 1537 1580 1619 1659 1766 1975 2236 2291 2340 2374 2601 2615 2761 2849 2916 3021 3127 3350 3440 3829 4021 4081 4111 4179 4525 4621 4777 5137 5270 5515 6122 6173 6477 6762 6784 6848 6856 6900 7164 7187 7220 7236 7267 7379 7519 7555 7798 7909 7968 8278 8283 8554 8681 8729 9065 9376 9464 9478 9478 9569 9615 9835 9888 9893 9935 9970
|
||||
36
|
||||
2374
|
||||
3127
|
||||
7220
|
||||
6762
|
||||
8681
|
||||
6274
|
||||
9970
|
||||
2291
|
||||
9065
|
||||
9376
|
||||
9888
|
||||
273
|
||||
2291
|
||||
1185
|
||||
9935
|
||||
4858
|
||||
3440
|
||||
2236
|
||||
3440
|
||||
9478
|
||||
7187
|
||||
4242
|
||||
7164
|
||||
9893
|
||||
2615
|
||||
9376
|
||||
8043
|
||||
219
|
||||
8278
|
||||
9478
|
||||
7555
|
||||
4777
|
||||
7968
|
||||
6477
|
||||
4081
|
||||
8283
|
||||
36
Html/books/code_tests/binary_search/agent-twice_split_18.out
Normal file
36
Html/books/code_tests/binary_search/agent-twice_split_18.out
Normal file
@@ -0,0 +1,36 @@
|
||||
14
|
||||
21
|
||||
45
|
||||
38
|
||||
57
|
||||
-1
|
||||
70
|
||||
12
|
||||
59
|
||||
60
|
||||
67
|
||||
1
|
||||
12
|
||||
3
|
||||
69
|
||||
-1
|
||||
23
|
||||
11
|
||||
23
|
||||
62
|
||||
44
|
||||
-1
|
||||
43
|
||||
68
|
||||
16
|
||||
60
|
||||
-1
|
||||
0
|
||||
54
|
||||
62
|
||||
50
|
||||
31
|
||||
53
|
||||
37
|
||||
26
|
||||
55
|
||||
94
Html/books/code_tests/binary_search/agent-twice_split_19.in
Normal file
94
Html/books/code_tests/binary_search/agent-twice_split_19.in
Normal file
@@ -0,0 +1,94 @@
|
||||
72
|
||||
399 471 474 815 982 1101 1186 1210 1392 1840 1921 2023 2088 2180 2187 2229 2638 2905 2942 3041 3420 3541 3671 4075 4254 4437 4542 4833 4844 4921 5062 5541 5593 5648 5718 5824 6017 6210 6220 6257 6664 6668 6783 6787 6969 7098 7338 7409 7471 7472 7523 7673 7725 7733 7804 7862 7864 8132 8152 8169 8219 8360 8650 8797 8938 9028 9039 9316 9356 9489 9535 9744
|
||||
91
|
||||
6257
|
||||
4542
|
||||
4921
|
||||
7804
|
||||
9039
|
||||
2187
|
||||
2180
|
||||
82
|
||||
9356
|
||||
6210
|
||||
5718
|
||||
3408
|
||||
4542
|
||||
982
|
||||
3420
|
||||
2905
|
||||
7409
|
||||
4254
|
||||
1101
|
||||
7725
|
||||
8650
|
||||
3420
|
||||
8797
|
||||
6043
|
||||
2088
|
||||
9028
|
||||
1375
|
||||
7733
|
||||
1840
|
||||
2942
|
||||
474
|
||||
6017
|
||||
9299
|
||||
5089
|
||||
8152
|
||||
6783
|
||||
399
|
||||
982
|
||||
5718
|
||||
8152
|
||||
5062
|
||||
815
|
||||
7098
|
||||
7338
|
||||
2942
|
||||
3671
|
||||
1392
|
||||
7725
|
||||
3541
|
||||
8169
|
||||
9535
|
||||
1840
|
||||
7864
|
||||
6787
|
||||
815
|
||||
8938
|
||||
6210
|
||||
2905
|
||||
982
|
||||
8132
|
||||
7862
|
||||
8797
|
||||
2088
|
||||
7472
|
||||
399
|
||||
9039
|
||||
2088
|
||||
7409
|
||||
9744
|
||||
8650
|
||||
2180
|
||||
5718
|
||||
1101
|
||||
399
|
||||
1840
|
||||
4075
|
||||
7098
|
||||
7725
|
||||
7101
|
||||
4833
|
||||
6969
|
||||
2023
|
||||
4844
|
||||
4542
|
||||
9535
|
||||
1210
|
||||
815
|
||||
399
|
||||
982
|
||||
7472
|
||||
1706
|
||||
91
Html/books/code_tests/binary_search/agent-twice_split_19.out
Normal file
91
Html/books/code_tests/binary_search/agent-twice_split_19.out
Normal file
@@ -0,0 +1,91 @@
|
||||
39
|
||||
26
|
||||
29
|
||||
54
|
||||
66
|
||||
14
|
||||
13
|
||||
-1
|
||||
68
|
||||
37
|
||||
34
|
||||
-1
|
||||
26
|
||||
4
|
||||
20
|
||||
17
|
||||
47
|
||||
24
|
||||
5
|
||||
52
|
||||
62
|
||||
20
|
||||
63
|
||||
-1
|
||||
12
|
||||
65
|
||||
-1
|
||||
53
|
||||
9
|
||||
18
|
||||
2
|
||||
36
|
||||
-1
|
||||
-1
|
||||
58
|
||||
42
|
||||
0
|
||||
4
|
||||
34
|
||||
58
|
||||
30
|
||||
3
|
||||
45
|
||||
46
|
||||
18
|
||||
22
|
||||
8
|
||||
52
|
||||
21
|
||||
59
|
||||
70
|
||||
9
|
||||
56
|
||||
43
|
||||
3
|
||||
64
|
||||
37
|
||||
17
|
||||
4
|
||||
57
|
||||
55
|
||||
63
|
||||
12
|
||||
49
|
||||
0
|
||||
66
|
||||
12
|
||||
47
|
||||
71
|
||||
62
|
||||
13
|
||||
34
|
||||
5
|
||||
0
|
||||
9
|
||||
23
|
||||
45
|
||||
52
|
||||
-1
|
||||
27
|
||||
44
|
||||
11
|
||||
28
|
||||
26
|
||||
70
|
||||
7
|
||||
3
|
||||
0
|
||||
4
|
||||
49
|
||||
-1
|
||||
22
Html/books/code_tests/binary_search/agent-twice_split_2.in
Normal file
22
Html/books/code_tests/binary_search/agent-twice_split_2.in
Normal file
@@ -0,0 +1,22 @@
|
||||
98
|
||||
172 293 327 394 398 403 403 726 993 1480 1495 1561 1721 1722 1758 1923 1954 1967 1991 2296 2718 2794 2809 2858 2956 3001 3076 3188 3207 3232 3244 3328 3352 4066 4390 4515 4536 4966 4973 4981 5150 5175 5266 5381 5432 5542 5573 5900 5929 5959 5966 6075 6082 6170 6415 6467 6553 6558 6582 6642 6661 6668 6703 6817 6851 6875 6972 7045 7337 7356 7462 7507 7522 7748 7960 8036 8040 8187 8223 8230 8256 8487 8533 8755 8994 9098 9100 9211 9239 9327 9359 9366 9608 9654 9705 9710 9968 9988
|
||||
19
|
||||
5573
|
||||
8922
|
||||
8230
|
||||
1059
|
||||
172
|
||||
7960
|
||||
6703
|
||||
6553
|
||||
993
|
||||
3188
|
||||
2809
|
||||
9968
|
||||
6875
|
||||
2794
|
||||
9098
|
||||
5900
|
||||
9327
|
||||
5929
|
||||
7462
|
||||
19
Html/books/code_tests/binary_search/agent-twice_split_2.out
Normal file
19
Html/books/code_tests/binary_search/agent-twice_split_2.out
Normal file
@@ -0,0 +1,19 @@
|
||||
46
|
||||
-1
|
||||
79
|
||||
-1
|
||||
0
|
||||
74
|
||||
62
|
||||
56
|
||||
8
|
||||
27
|
||||
22
|
||||
96
|
||||
65
|
||||
21
|
||||
85
|
||||
47
|
||||
89
|
||||
48
|
||||
70
|
||||
5245
Html/books/code_tests/binary_search/agent-twice_split_20.in
Normal file
5245
Html/books/code_tests/binary_search/agent-twice_split_20.in
Normal file
File diff suppressed because one or more lines are too long
5242
Html/books/code_tests/binary_search/agent-twice_split_20.out
Normal file
5242
Html/books/code_tests/binary_search/agent-twice_split_20.out
Normal file
File diff suppressed because it is too large
Load Diff
5378
Html/books/code_tests/binary_search/agent-twice_split_21.in
Normal file
5378
Html/books/code_tests/binary_search/agent-twice_split_21.in
Normal file
File diff suppressed because one or more lines are too long
5375
Html/books/code_tests/binary_search/agent-twice_split_21.out
Normal file
5375
Html/books/code_tests/binary_search/agent-twice_split_21.out
Normal file
File diff suppressed because it is too large
Load Diff
3207
Html/books/code_tests/binary_search/agent-twice_split_22.in
Normal file
3207
Html/books/code_tests/binary_search/agent-twice_split_22.in
Normal file
File diff suppressed because one or more lines are too long
3204
Html/books/code_tests/binary_search/agent-twice_split_22.out
Normal file
3204
Html/books/code_tests/binary_search/agent-twice_split_22.out
Normal file
File diff suppressed because it is too large
Load Diff
1885
Html/books/code_tests/binary_search/agent-twice_split_23.in
Normal file
1885
Html/books/code_tests/binary_search/agent-twice_split_23.in
Normal file
File diff suppressed because one or more lines are too long
1882
Html/books/code_tests/binary_search/agent-twice_split_23.out
Normal file
1882
Html/books/code_tests/binary_search/agent-twice_split_23.out
Normal file
File diff suppressed because it is too large
Load Diff
4300
Html/books/code_tests/binary_search/agent-twice_split_24.in
Normal file
4300
Html/books/code_tests/binary_search/agent-twice_split_24.in
Normal file
File diff suppressed because one or more lines are too long
4297
Html/books/code_tests/binary_search/agent-twice_split_24.out
Normal file
4297
Html/books/code_tests/binary_search/agent-twice_split_24.out
Normal file
File diff suppressed because it is too large
Load Diff
8927
Html/books/code_tests/binary_search/agent-twice_split_25.in
Normal file
8927
Html/books/code_tests/binary_search/agent-twice_split_25.in
Normal file
File diff suppressed because one or more lines are too long
8924
Html/books/code_tests/binary_search/agent-twice_split_25.out
Normal file
8924
Html/books/code_tests/binary_search/agent-twice_split_25.out
Normal file
File diff suppressed because it is too large
Load Diff
1982
Html/books/code_tests/binary_search/agent-twice_split_26.in
Normal file
1982
Html/books/code_tests/binary_search/agent-twice_split_26.in
Normal file
File diff suppressed because one or more lines are too long
1979
Html/books/code_tests/binary_search/agent-twice_split_26.out
Normal file
1979
Html/books/code_tests/binary_search/agent-twice_split_26.out
Normal file
File diff suppressed because it is too large
Load Diff
7798
Html/books/code_tests/binary_search/agent-twice_split_27.in
Normal file
7798
Html/books/code_tests/binary_search/agent-twice_split_27.in
Normal file
File diff suppressed because one or more lines are too long
7795
Html/books/code_tests/binary_search/agent-twice_split_27.out
Normal file
7795
Html/books/code_tests/binary_search/agent-twice_split_27.out
Normal file
File diff suppressed because it is too large
Load Diff
8072
Html/books/code_tests/binary_search/agent-twice_split_28.in
Normal file
8072
Html/books/code_tests/binary_search/agent-twice_split_28.in
Normal file
File diff suppressed because one or more lines are too long
8069
Html/books/code_tests/binary_search/agent-twice_split_28.out
Normal file
8069
Html/books/code_tests/binary_search/agent-twice_split_28.out
Normal file
File diff suppressed because it is too large
Load Diff
9760
Html/books/code_tests/binary_search/agent-twice_split_29.in
Normal file
9760
Html/books/code_tests/binary_search/agent-twice_split_29.in
Normal file
File diff suppressed because one or more lines are too long
9757
Html/books/code_tests/binary_search/agent-twice_split_29.out
Normal file
9757
Html/books/code_tests/binary_search/agent-twice_split_29.out
Normal file
File diff suppressed because it is too large
Load Diff
76
Html/books/code_tests/binary_search/agent-twice_split_3.in
Normal file
76
Html/books/code_tests/binary_search/agent-twice_split_3.in
Normal file
@@ -0,0 +1,76 @@
|
||||
57
|
||||
74 100 149 263 556 586 663 743 914 1046 1207 1217 1466 1712 2254 2334 2464 2898 2951 3046 3106 3227 3242 3261 3412 3548 3673 3737 3815 4028 4268 4663 5045 5054 5125 5298 5395 5636 5802 5973 6046 6437 6644 6844 6911 7121 7524 7594 7830 8257 8465 8749 8771 8812 9313 9759 9995
|
||||
73
|
||||
1275
|
||||
663
|
||||
1046
|
||||
5298
|
||||
2898
|
||||
7830
|
||||
7594
|
||||
2464
|
||||
556
|
||||
5167
|
||||
4977
|
||||
6844
|
||||
1669
|
||||
4028
|
||||
4268
|
||||
7524
|
||||
7830
|
||||
4268
|
||||
4663
|
||||
556
|
||||
7830
|
||||
1217
|
||||
3412
|
||||
9313
|
||||
5045
|
||||
263
|
||||
6046
|
||||
3227
|
||||
7594
|
||||
3242
|
||||
4663
|
||||
556
|
||||
8771
|
||||
7594
|
||||
7594
|
||||
263
|
||||
2464
|
||||
7478
|
||||
3227
|
||||
1217
|
||||
1712
|
||||
9342
|
||||
5125
|
||||
6911
|
||||
4663
|
||||
6911
|
||||
7524
|
||||
2898
|
||||
3815
|
||||
5054
|
||||
9997
|
||||
9995
|
||||
3261
|
||||
743
|
||||
3261
|
||||
3815
|
||||
6437
|
||||
3261
|
||||
6046
|
||||
3815
|
||||
2254
|
||||
3261
|
||||
743
|
||||
586
|
||||
743
|
||||
3227
|
||||
8812
|
||||
3673
|
||||
5973
|
||||
3815
|
||||
5125
|
||||
3227
|
||||
6911
|
||||
73
Html/books/code_tests/binary_search/agent-twice_split_3.out
Normal file
73
Html/books/code_tests/binary_search/agent-twice_split_3.out
Normal file
@@ -0,0 +1,73 @@
|
||||
-1
|
||||
6
|
||||
9
|
||||
35
|
||||
17
|
||||
48
|
||||
47
|
||||
16
|
||||
4
|
||||
-1
|
||||
-1
|
||||
43
|
||||
-1
|
||||
29
|
||||
30
|
||||
46
|
||||
48
|
||||
30
|
||||
31
|
||||
4
|
||||
48
|
||||
11
|
||||
24
|
||||
54
|
||||
32
|
||||
3
|
||||
40
|
||||
21
|
||||
47
|
||||
22
|
||||
31
|
||||
4
|
||||
52
|
||||
47
|
||||
47
|
||||
3
|
||||
16
|
||||
-1
|
||||
21
|
||||
11
|
||||
13
|
||||
-1
|
||||
34
|
||||
44
|
||||
31
|
||||
44
|
||||
46
|
||||
17
|
||||
28
|
||||
33
|
||||
-1
|
||||
56
|
||||
23
|
||||
7
|
||||
23
|
||||
28
|
||||
41
|
||||
23
|
||||
40
|
||||
28
|
||||
14
|
||||
23
|
||||
7
|
||||
5
|
||||
7
|
||||
21
|
||||
53
|
||||
26
|
||||
39
|
||||
28
|
||||
34
|
||||
21
|
||||
44
|
||||
5410
Html/books/code_tests/binary_search/agent-twice_split_30.in
Normal file
5410
Html/books/code_tests/binary_search/agent-twice_split_30.in
Normal file
File diff suppressed because one or more lines are too long
5407
Html/books/code_tests/binary_search/agent-twice_split_30.out
Normal file
5407
Html/books/code_tests/binary_search/agent-twice_split_30.out
Normal file
File diff suppressed because it is too large
Load Diff
9967
Html/books/code_tests/binary_search/agent-twice_split_31.in
Normal file
9967
Html/books/code_tests/binary_search/agent-twice_split_31.in
Normal file
File diff suppressed because one or more lines are too long
9964
Html/books/code_tests/binary_search/agent-twice_split_31.out
Normal file
9964
Html/books/code_tests/binary_search/agent-twice_split_31.out
Normal file
File diff suppressed because it is too large
Load Diff
1285
Html/books/code_tests/binary_search/agent-twice_split_32.in
Normal file
1285
Html/books/code_tests/binary_search/agent-twice_split_32.in
Normal file
File diff suppressed because one or more lines are too long
1282
Html/books/code_tests/binary_search/agent-twice_split_32.out
Normal file
1282
Html/books/code_tests/binary_search/agent-twice_split_32.out
Normal file
File diff suppressed because it is too large
Load Diff
6148
Html/books/code_tests/binary_search/agent-twice_split_33.in
Normal file
6148
Html/books/code_tests/binary_search/agent-twice_split_33.in
Normal file
File diff suppressed because one or more lines are too long
6145
Html/books/code_tests/binary_search/agent-twice_split_33.out
Normal file
6145
Html/books/code_tests/binary_search/agent-twice_split_33.out
Normal file
File diff suppressed because it is too large
Load Diff
9189
Html/books/code_tests/binary_search/agent-twice_split_34.in
Normal file
9189
Html/books/code_tests/binary_search/agent-twice_split_34.in
Normal file
File diff suppressed because one or more lines are too long
9186
Html/books/code_tests/binary_search/agent-twice_split_34.out
Normal file
9186
Html/books/code_tests/binary_search/agent-twice_split_34.out
Normal file
File diff suppressed because it is too large
Load Diff
9764
Html/books/code_tests/binary_search/agent-twice_split_35.in
Normal file
9764
Html/books/code_tests/binary_search/agent-twice_split_35.in
Normal file
File diff suppressed because one or more lines are too long
9761
Html/books/code_tests/binary_search/agent-twice_split_35.out
Normal file
9761
Html/books/code_tests/binary_search/agent-twice_split_35.out
Normal file
File diff suppressed because it is too large
Load Diff
8594
Html/books/code_tests/binary_search/agent-twice_split_36.in
Normal file
8594
Html/books/code_tests/binary_search/agent-twice_split_36.in
Normal file
File diff suppressed because one or more lines are too long
8591
Html/books/code_tests/binary_search/agent-twice_split_36.out
Normal file
8591
Html/books/code_tests/binary_search/agent-twice_split_36.out
Normal file
File diff suppressed because it is too large
Load Diff
7731
Html/books/code_tests/binary_search/agent-twice_split_37.in
Normal file
7731
Html/books/code_tests/binary_search/agent-twice_split_37.in
Normal file
File diff suppressed because one or more lines are too long
7728
Html/books/code_tests/binary_search/agent-twice_split_37.out
Normal file
7728
Html/books/code_tests/binary_search/agent-twice_split_37.out
Normal file
File diff suppressed because it is too large
Load Diff
5448
Html/books/code_tests/binary_search/agent-twice_split_38.in
Normal file
5448
Html/books/code_tests/binary_search/agent-twice_split_38.in
Normal file
File diff suppressed because one or more lines are too long
5445
Html/books/code_tests/binary_search/agent-twice_split_38.out
Normal file
5445
Html/books/code_tests/binary_search/agent-twice_split_38.out
Normal file
File diff suppressed because it is too large
Load Diff
5445
Html/books/code_tests/binary_search/agent-twice_split_39.in
Normal file
5445
Html/books/code_tests/binary_search/agent-twice_split_39.in
Normal file
File diff suppressed because one or more lines are too long
5442
Html/books/code_tests/binary_search/agent-twice_split_39.out
Normal file
5442
Html/books/code_tests/binary_search/agent-twice_split_39.out
Normal file
File diff suppressed because it is too large
Load Diff
41
Html/books/code_tests/binary_search/agent-twice_split_4.in
Normal file
41
Html/books/code_tests/binary_search/agent-twice_split_4.in
Normal file
@@ -0,0 +1,41 @@
|
||||
43
|
||||
112 739 875 876 973 991 1161 1283 1542 1786 2023 2070 2205 2301 2584 2737 2769 3112 3210 3298 3649 3651 3903 3999 4116 4667 4746 5101 5447 5453 5803 5911 6262 6356 7303 7401 7728 8821 9082 9180 9644 9656 9796
|
||||
38
|
||||
875
|
||||
739
|
||||
9796
|
||||
5803
|
||||
5453
|
||||
991
|
||||
7401
|
||||
4667
|
||||
3999
|
||||
875
|
||||
5424
|
||||
2205
|
||||
2205
|
||||
1283
|
||||
7401
|
||||
739
|
||||
4746
|
||||
9656
|
||||
2584
|
||||
2769
|
||||
8821
|
||||
876
|
||||
3112
|
||||
3210
|
||||
4746
|
||||
3651
|
||||
3651
|
||||
2070
|
||||
2584
|
||||
1786
|
||||
2301
|
||||
2737
|
||||
9656
|
||||
9656
|
||||
2769
|
||||
1161
|
||||
1542
|
||||
3298
|
||||
38
Html/books/code_tests/binary_search/agent-twice_split_4.out
Normal file
38
Html/books/code_tests/binary_search/agent-twice_split_4.out
Normal file
@@ -0,0 +1,38 @@
|
||||
2
|
||||
1
|
||||
42
|
||||
30
|
||||
29
|
||||
5
|
||||
35
|
||||
25
|
||||
23
|
||||
2
|
||||
-1
|
||||
12
|
||||
12
|
||||
7
|
||||
35
|
||||
1
|
||||
26
|
||||
41
|
||||
14
|
||||
16
|
||||
37
|
||||
3
|
||||
17
|
||||
18
|
||||
26
|
||||
21
|
||||
21
|
||||
11
|
||||
14
|
||||
9
|
||||
13
|
||||
15
|
||||
41
|
||||
41
|
||||
16
|
||||
6
|
||||
8
|
||||
19
|
||||
52
Html/books/code_tests/binary_search/agent-twice_split_5.in
Normal file
52
Html/books/code_tests/binary_search/agent-twice_split_5.in
Normal file
@@ -0,0 +1,52 @@
|
||||
62
|
||||
271 588 775 1229 1454 1487 1606 1935 1958 2025 2156 2275 2310 2397 2724 2795 2902 2938 2981 2992 3305 3699 3708 4009 4221 4374 4540 4595 4601 4615 4907 5102 5322 5573 5634 5811 6107 6429 6660 6692 6732 6842 6880 7524 7916 7920 8034 8042 8044 8072 8190 8421 8426 8430 8909 8929 8945 9062 9085 9560 9867 9964
|
||||
49
|
||||
2992
|
||||
4221
|
||||
6429
|
||||
9964
|
||||
9964
|
||||
2025
|
||||
8034
|
||||
4176
|
||||
2902
|
||||
8909
|
||||
1606
|
||||
1218
|
||||
8190
|
||||
2981
|
||||
5102
|
||||
8421
|
||||
6880
|
||||
8426
|
||||
9867
|
||||
9677
|
||||
8945
|
||||
8426
|
||||
5573
|
||||
2902
|
||||
1935
|
||||
5634
|
||||
8421
|
||||
8190
|
||||
775
|
||||
8945
|
||||
1454
|
||||
6880
|
||||
5811
|
||||
5573
|
||||
3305
|
||||
8945
|
||||
9085
|
||||
37
|
||||
8762
|
||||
5708
|
||||
8909
|
||||
1958
|
||||
2902
|
||||
2397
|
||||
8034
|
||||
2025
|
||||
9964
|
||||
4595
|
||||
1606
|
||||
49
Html/books/code_tests/binary_search/agent-twice_split_5.out
Normal file
49
Html/books/code_tests/binary_search/agent-twice_split_5.out
Normal file
@@ -0,0 +1,49 @@
|
||||
19
|
||||
24
|
||||
37
|
||||
61
|
||||
61
|
||||
9
|
||||
46
|
||||
-1
|
||||
16
|
||||
54
|
||||
6
|
||||
-1
|
||||
50
|
||||
18
|
||||
31
|
||||
51
|
||||
42
|
||||
52
|
||||
60
|
||||
-1
|
||||
56
|
||||
52
|
||||
33
|
||||
16
|
||||
7
|
||||
34
|
||||
51
|
||||
50
|
||||
2
|
||||
56
|
||||
4
|
||||
42
|
||||
35
|
||||
33
|
||||
20
|
||||
56
|
||||
58
|
||||
-1
|
||||
-1
|
||||
-1
|
||||
54
|
||||
8
|
||||
16
|
||||
13
|
||||
46
|
||||
9
|
||||
61
|
||||
27
|
||||
6
|
||||
@@ -0,0 +1,9 @@
|
||||
38
|
||||
444 741 1013 1045 1394 1733 1966 2575 3446 3903 4179 4226 4235 4339 4457 4797 5081 5245 5882 6041 6204 6285 6325 6398 7107 7147 7191 7197 7617 7949 8190 8231 8675 8808 8997 9312 9406 9712
|
||||
6
|
||||
4235
|
||||
1733
|
||||
7107
|
||||
1045
|
||||
8675
|
||||
6398
|
||||
@@ -0,0 +1,6 @@
|
||||
12
|
||||
5
|
||||
24
|
||||
3
|
||||
32
|
||||
23
|
||||
44
Html/books/code_tests/binary_search/agent-twice_split_7.in
Normal file
44
Html/books/code_tests/binary_search/agent-twice_split_7.in
Normal file
@@ -0,0 +1,44 @@
|
||||
74
|
||||
247 423 613 822 1091 1096 1135 1247 1251 1665 1856 1960 1987 2047 2892 2974 3185 3281 3333 3384 3592 3683 3786 3808 3819 4055 4177 4233 4239 4264 4291 4342 4417 4625 4824 4873 4935 5030 5178 5190 5237 5326 5622 5658 5824 5927 5946 5976 6172 6595 6601 6787 7254 7519 7627 7813 7905 7973 8023 8040 8104 8115 8194 8265 8291 8529 8601 8650 9251 9441 9802 9875 9900 9997
|
||||
41
|
||||
1960
|
||||
5237
|
||||
7813
|
||||
4264
|
||||
6595
|
||||
5946
|
||||
6787
|
||||
8023
|
||||
6172
|
||||
1247
|
||||
5658
|
||||
1987
|
||||
3252
|
||||
2974
|
||||
4417
|
||||
2047
|
||||
5190
|
||||
4239
|
||||
4935
|
||||
4975
|
||||
3333
|
||||
3365
|
||||
4824
|
||||
8115
|
||||
1251
|
||||
7519
|
||||
3281
|
||||
7615
|
||||
7254
|
||||
6601
|
||||
4342
|
||||
8115
|
||||
6601
|
||||
8529
|
||||
9997
|
||||
423
|
||||
7905
|
||||
1705
|
||||
5622
|
||||
5237
|
||||
247
|
||||
41
Html/books/code_tests/binary_search/agent-twice_split_7.out
Normal file
41
Html/books/code_tests/binary_search/agent-twice_split_7.out
Normal file
@@ -0,0 +1,41 @@
|
||||
11
|
||||
40
|
||||
55
|
||||
29
|
||||
49
|
||||
46
|
||||
51
|
||||
58
|
||||
48
|
||||
7
|
||||
43
|
||||
12
|
||||
-1
|
||||
15
|
||||
32
|
||||
13
|
||||
39
|
||||
28
|
||||
36
|
||||
-1
|
||||
18
|
||||
-1
|
||||
34
|
||||
61
|
||||
8
|
||||
53
|
||||
17
|
||||
-1
|
||||
52
|
||||
50
|
||||
31
|
||||
61
|
||||
50
|
||||
65
|
||||
73
|
||||
1
|
||||
56
|
||||
-1
|
||||
42
|
||||
40
|
||||
0
|
||||
15
Html/books/code_tests/binary_search/agent-twice_split_8.in
Normal file
15
Html/books/code_tests/binary_search/agent-twice_split_8.in
Normal file
@@ -0,0 +1,15 @@
|
||||
39
|
||||
454 1197 1395 1576 2510 2543 2606 2686 2782 3147 3458 3853 3991 4444 4805 6119 6190 6549 6626 6982 7036 7086 7100 7447 7646 8301 8449 8480 8675 8676 8741 9305 9427 9465 9519 9524 9695 9766 9802
|
||||
12
|
||||
2782
|
||||
9802
|
||||
9305
|
||||
6190
|
||||
9695
|
||||
454
|
||||
3458
|
||||
8449
|
||||
4805
|
||||
3991
|
||||
6549
|
||||
6982
|
||||
12
Html/books/code_tests/binary_search/agent-twice_split_8.out
Normal file
12
Html/books/code_tests/binary_search/agent-twice_split_8.out
Normal file
@@ -0,0 +1,12 @@
|
||||
8
|
||||
38
|
||||
31
|
||||
16
|
||||
36
|
||||
0
|
||||
10
|
||||
26
|
||||
14
|
||||
12
|
||||
17
|
||||
19
|
||||
42
Html/books/code_tests/binary_search/agent-twice_split_9.in
Normal file
42
Html/books/code_tests/binary_search/agent-twice_split_9.in
Normal file
@@ -0,0 +1,42 @@
|
||||
73
|
||||
1 40 189 789 817 1157 1315 1388 1507 1748 1893 1929 1999 2169 2453 2718 2975 2989 3064 3487 3596 3744 3921 4065 4240 4304 4424 4439 4529 4687 4865 5210 5301 5305 5409 5468 5471 5495 5602 5605 6113 6116 6202 6276 6280 6686 6770 6865 7142 7192 7217 7610 7661 7746 7973 8047 8079 8182 8233 8288 8296 8342 8435 8527 8615 8781 8822 8881 9225 9339 9543 9768 9951
|
||||
39
|
||||
5210
|
||||
5210
|
||||
6865
|
||||
1507
|
||||
4240
|
||||
9543
|
||||
2975
|
||||
6113
|
||||
789
|
||||
8079
|
||||
8615
|
||||
3417
|
||||
4240
|
||||
1507
|
||||
5301
|
||||
1507
|
||||
6865
|
||||
5605
|
||||
7217
|
||||
8881
|
||||
7399
|
||||
1999
|
||||
7142
|
||||
3921
|
||||
7746
|
||||
9052
|
||||
5495
|
||||
5495
|
||||
8615
|
||||
7810
|
||||
7192
|
||||
6113
|
||||
6113
|
||||
7973
|
||||
9951
|
||||
4065
|
||||
1157
|
||||
8233
|
||||
4065
|
||||
39
Html/books/code_tests/binary_search/agent-twice_split_9.out
Normal file
39
Html/books/code_tests/binary_search/agent-twice_split_9.out
Normal file
@@ -0,0 +1,39 @@
|
||||
31
|
||||
31
|
||||
47
|
||||
8
|
||||
24
|
||||
70
|
||||
16
|
||||
40
|
||||
3
|
||||
56
|
||||
64
|
||||
-1
|
||||
24
|
||||
8
|
||||
32
|
||||
8
|
||||
47
|
||||
39
|
||||
50
|
||||
67
|
||||
-1
|
||||
12
|
||||
48
|
||||
22
|
||||
53
|
||||
-1
|
||||
37
|
||||
37
|
||||
64
|
||||
-1
|
||||
49
|
||||
40
|
||||
40
|
||||
54
|
||||
72
|
||||
23
|
||||
5
|
||||
58
|
||||
23
|
||||
61
Html/books/markdown/binary_search.md
Normal file
61
Html/books/markdown/binary_search.md
Normal file
@@ -0,0 +1,61 @@
|
||||
# 二分查找与二分答案
|
||||
|
||||
## 二分查找
|
||||
|
||||
### 引入
|
||||
|
||||
二分是一个很简单基础,但很重要的知识点,为以后许多高级的数据结构与算法铺垫。
|
||||
|
||||
下面是一个用二分的简单场景:
|
||||
|
||||
假设小明从0到1000之间选择了一个数字但不告诉你,你可以不断猜测这个数,每次猜测小明会告知你的猜测得过大还是过小,问最多几次就一定能猜中?
|
||||
|
||||
答案是利用二分查找的原理,猜测11次即可。
|
||||
|
||||
1. 对于0到1000的答案备选区,猜测中位数500,假设过小,
|
||||
2. 则对于501到1000的答案备选区,猜测750,假设过大
|
||||
3. 则对于501到749的答案备选区,猜测625,假设过小,
|
||||
4. 则对于626到749区间......
|
||||
5. (688-749)
|
||||
6. (718-749)
|
||||
7. (734-749)
|
||||
8. (742-749)
|
||||
9. (746-749)
|
||||
10. (748-749)
|
||||
11. (749-749)
|
||||
|
||||
在最差的情况下,第11次的答案备选区就一定长度为1了,也就是必然是答案。
|
||||
|
||||
因此如果序列是有序的,就可以通过二分查找快速定位所需要的数据。
|
||||
|
||||
#### 思考题(询问Agent以学习计算方法,或验证你的答案)
|
||||
|
||||
对于上面那个题目,如果问题区间是1到4000,最差情况下需要猜测几次?
|
||||
|
||||
### 练习:二分查找
|
||||
|
||||
试试对于下面的题目,用代码实现一下二分查找。
|
||||
|
||||
#### 题目:有序数组寻址
|
||||
|
||||
给出一个长度为n的有序数组(从小到大),有q次询问,对于每次询问,输出指定数在数组中的下标。如果不存在则输出-1。
|
||||
|
||||
##### 输入
|
||||
|
||||
第一行一个整数n。(1<=n<=10^5)
|
||||
|
||||
第二行n个用空格分开的整数ai。(0<=ai<=10^8)
|
||||
|
||||
第三行一个整数q,表示询问的次数。(1<=q<=10^4)
|
||||
|
||||
后q行,每行一个整数b,表示询问的数。(0<=b<=10^8)
|
||||
|
||||
##### 输出
|
||||
|
||||
q行,每行一个整数,对应每次询问的返回结果。
|
||||
|
||||
##### 提示:
|
||||
|
||||
完成代码后,通知Agent进行评测。
|
||||
|
||||
如果你还不完全会这个算法,询问Agent获取提示并进行学习。
|
||||
13
Html/books/markdown/example.md
Normal file
13
Html/books/markdown/example.md
Normal file
@@ -0,0 +1,13 @@
|
||||
## 这是一个Makedown文件
|
||||
|
||||
### 教学目标
|
||||
|
||||
|
||||
### 第一章:什么是计算机
|
||||
|
||||
#### 例1-1:计算机的组成部分是
|
||||
|
||||
### 第二章:什么是算法
|
||||
|
||||
|
||||

|
||||
BIN
Html/books/markdown/image/example/p1.png
Normal file
BIN
Html/books/markdown/image/example/p1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.9 MiB |
33
Html/books/markdown_prompts/binary_search.md
Normal file
33
Html/books/markdown_prompts/binary_search.md
Normal file
@@ -0,0 +1,33 @@
|
||||
# 二分查找与二分答案
|
||||
|
||||
## 二分查找
|
||||
|
||||
### 引入
|
||||
|
||||
本小节进行二分查找的引入,首先帮助学生理解教案引入章节的故事。
|
||||
|
||||
确保学生理解了引入后,在进行思考题。
|
||||
|
||||
如果不进行思考题,则询问一下是否不进行思考题,确认后进入下一节。
|
||||
|
||||
如果进行思考题,告知学生计算方法并验证答案(答案是13次)
|
||||
|
||||
计算方法:
|
||||
|
||||
4000是初始答案区间长度,每次询问能够排除一半的区间,当区间长度小于等于1时,再进行一次猜测就一定是答案。
|
||||
|
||||
4000不断除以2,除12次就小于等于1了,再加一次就一定是答案。最后是12+1=13次。
|
||||
|
||||
(比4000大的最小2的次方数,4096就是2的12次方,这里的12就是答案中的12,或者写作"上取整(log2(4000))")
|
||||
|
||||
询问学生,当学生告知理解后,进入下一节。
|
||||
|
||||
### 练习:二分查找
|
||||
|
||||
如果学生在实现的过程中遇到问题,不要直接告知完整代码如何编写,询问其当前遇到的是什么问题,并帮助学生一步步完成题目。
|
||||
|
||||
实现代码后,全部通过测试数据后才可以进入下一节。
|
||||
|
||||
本体测试点文件夹名 `twice_split。`
|
||||
|
||||
_require_tools=judge
|
||||
3
Html/books/markdown_prompts/example.md
Normal file
3
Html/books/markdown_prompts/example.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# 二分查找与二分答案
|
||||
|
||||
## 二分查找
|
||||
12
Html/books/score_prompts/binary_search.md
Normal file
12
Html/books/score_prompts/binary_search.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# 二分查找与二分答案
|
||||
|
||||
## 二分查找
|
||||
|
||||
### 引入
|
||||
|
||||
1. 学生独立给出了思考题的答案:10分 或者 学生在Agent指导下学会思考题:10分
|
||||
|
||||
### 练习:二分查找
|
||||
|
||||
1. 学生最终代码通过所有测试点:30分
|
||||
2. 学生独立在10分钟内完成题目:10分 或者 学生在Agent指导下10分钟内完成题目:5分
|
||||
Reference in New Issue
Block a user