#2301. 猜数字

猜数字

猜数字

题目描述

猜数字 - Problem - QOJ.ac

Login

Register

QOJ.ac

QOJ

[QOJ](//qoj.ac)

Contests

Category

Problems

Submissions

Hack!

Blogs

Day 1

		Time Limit:			2 s		
			Memory Limit:			512 MB		
			Total points:			100		

				SNOI 2018 Day 1				

		A.
		猜数字		

	




[
	Statistics	](/contest/2601/problem/15045/statistics)








	[
		Statement		](#tab-statement)

			

[ Languages](#)


	[Default](/contest/2601/problem/15045/statement/default)
	


							[English](/contest/2601/problem/15045/statement/en)

Submit

Custom Test

Attachments

Discussions & Issues

Back to the contest

Submit

Run

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0

No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.

Do not submit duplicated issues.

Issues must be filed in English or Chinese only.

Active Issues 0

No issues in this category.

Closed/Resolved Issues 0

No issues in this category.

					 English					
				

				[العربية](//qoj.ac/contest/2601/problem/15045?locale=ar)
					[English](//qoj.ac/contest/2601/problem/15045?locale=en)
					[Español](//qoj.ac/contest/2601/problem/15045?locale=es)
					[Français](//qoj.ac/contest/2601/problem/15045?locale=fr)
					[日本語](//qoj.ac/contest/2601/problem/15045?locale=ja)
					[한국어](//qoj.ac/contest/2601/problem/15045?locale=ko)
						[Türkçe](//qoj.ac/contest/2601/problem/15045?locale=tr)
						[简体中文](//qoj.ac/contest/2601/problem/15045?locale=zh-cn)
					[繁體中文](//qoj.ac/contest/2601/problem/15045?locale=zh-tw)

QOJ.ac | QOJ 4.5.49 (2019-2026)

Made with ❤️ by Qingyu✨ | Contact us: [email protected]

Server Time: 2026-11-09 08:12:43 (UTC+8)

输入格式

(见题面原文)

输出格式

(见题面原文)

数据范围

(见题面原文)

样例

样例 1

1000
1000
484 629
16 591
293 908
43 276
469 730
402 933
59 518
59 986
307 398
181 860
294 313
17 944
917 970
900 957
583 774
110 921
308 833
378 903
294 609
288 611
554 899
440 505
25 904
691 896
264 859
737 962
15 910
358 597
26 917
174 667
161 360
318 691
440 561
40 69
67 692
59 788
165 234
244 903
284 877
625 932
359 802
897 902
117 332
122 147
14 219
33 636
155 994
464 535
525 600
430 451
180 359
468 821
852 895
292 495
389 788
322 735
57 600
132 901
414 535
8 31
87 384
374 837
435 470
557 862
250 415
203 514
62 719
42 475
729 802
250 849
297 560
480 899
163 842
578 763
390 487
182 995
230 339
238 759
676 933
400 641
57 528
18 209
576 999
63 796
302 425
140 293
13 16
50 595
555 708
86 849
532 629
37 300
728 995
242 425
28 107
631 792
827 952
268 421
26 561
515 898
107 332
232 975
839 962
541 780
237 856
47 598
238 703
734 849
866 909
176 917
501 612
282 689
853 930
422 541
462 515
53 438
435 776
28 613
114 413
161 886
101 958
579 708
255 322
177 414
487 560
58 633
485 486
64 529
373 530
255 800
303 580
645 670
57 288
27 820
74 501
175 254
28 853
452 655
396 885
457 704
530 905
558 929
9 438
135 754
131 444
158 399
618 937
389 746
473 742
434 993
249 876
300 911
570 609
149 550
35 844
158 643
82 425
424 449
573 700
865 976
533 764
312 993
714 943
706 913
857 936
175 576
61 142
58 427
212 247
676 719
403 790
139 268
95 924
180 623
107 820
158 389
18 469
23 190
232 799
331 546
264 567
194 205
53 392
302 471
541 664
48 565
354 379
347 746
788 975
126 223
606 981
63 572
7 486
266 639
77 496
196 323
556 973
61 178
12 383
150 311
877 898
66 589
196 455
401 456
671 928
581 714
135 732
39 172
634 673
193 670
190 643
428 667
210 379
801 888
185 238
587 960
111 222
177 602
807 964
29 220
150 829
404 913
689 802
214 269
70 417
316 371
32 829
664 665
174 453
289 426
646 789
502 879
182 835
555 932
623 930
356 907
200 495
69 990
371 644
486 853
110 257
166 781
54 165
228 891
902 999
359 588
679 822
31 280
2 37
274 433
515 604
172 641
262 813
152 963
42 103
328 387
819 854
629 988
289 886
170 805
470 947
368 943
150 251
209 550
638 925
505 842
486 715
327 902
545 694
3 278
460 591
225 630
158 789
566 785
560 967
95 858
509 840
319 844
79 458
352 519
671 826
109 448
158 813
401 818
31 170
160 903
335 346
90 503
699 816
432 797
793 962
232 751
144 765
449 694
63 518
577 788
737 942
188 421
132 311
425 774
84 623
364 593
813 848
114 567
419 970
254 421
550 589
38 851
806 883
171 544
540 769
684 799
404 953
1 928
877 956
327 874
98 355
242 639
902 991
591 812
601 724
393 902
244 357
306 599
896 939
797 926
546 829
43 870
550 771
168 399
749 854
779 892
189 998
287 874
561 956
305 458
61 250
175 724
451 556
51 690
674 813
53 378
280 805
519 622
893 898
537 956
186 329
688 839
174 891
590 867
327 858
227 498
115 786
623 868
46 289
41 120
181 906
343 382
262 857
381 394
238 425
235 318
192 509
617 630
98 399
198 287
608 727
406 847
960 971
118 807
623 972
11 298
603 872
254 331
70 265
360 845
487 494
61 906
496 957
365 870
37 754
418 719
776 977
556 829
49 814
288 881
111 314
611 916
851 886
232 947
224 399
95 116
47 340
199 240
693 772
640 997
2 335
208 687
853 906
247 998
466 891
69 736
144 943
531 832
349 716
500 955
275 642
207 624
588 775
629 662
409 888
204 911
125 798
360 361
21 104
58 821
315 726
547 692
260 833
555 700
447 684
220 865
20 889
338 751
207 778
290 955
160 495
448 557
523 988
581 844
58 293
11 530
39 640
589 594
548 553
26 733
646 805
338 537
221 748
589 686
104 151
11 442
484 849
197 802
103 570
173 912
1 16
37 748
321 884
914 947
133 318
474 839
343 902
304 893
298 575
135 226
57 278
79 376
452 839
829 922
372 593
477 702
291 844
137 254
325 660
631 722
98 307
912 931
638 639
139 216
762 891
459 650
207 874
449 878
150 407
150 269
134 169
246 809
155 378
145 592
315 382
531 848
173 914
248 893
344 865
585 694
558 993
250 791
425 566
671 752
581 874
600 825
321 612
145 494
92 509
687 944
14 591
291 750
657 868
459 524
252 783
301 334
144 355
280 371
275 644
579 994
155 846
392 523
467 620
213 246
765 786
193 860
72 105
688 893
135 298
298 737
89 256
402 971
145 806
386 713
191 790
41 174
882 905
753 914
337 926
61 844
6 483
6 349
131 298
288 743
255 944
99 990
591 814
6 683
38 865
12 277
289 864
534 985
403 962
25 246
530 847
311 388
544 731
375 718
349 536
379 952
37 186
704 849
149 320
99 596
165 604
951 998
302 819
218 229
394 771
479 484
359 380
264 583
139 658
22 59
134 369
711 836
251 390
226 801
709 984
31 596
577 600
534 757
308 531
296 719
69 118
391 486
8 181
675 718
428 953
30 423
101 780
397 676
505 880
2 851
701 744
384 613
428 711
287 548
60 589
295 772
356 861
288 371
237 508
67 910
672 717
33 892
88 907
368 701
514 905
104 761
748 817
297 406
244 573
329 874
22 245
265 492
258 701
734 931
140 517
730 855
79 160
3 630
545 674
172 759
316 931
574 969
182 349
281 672
170 301
223 762
435 666
212 775
229 354
457 988
433 658
334 493
123 894
494 923
148 653
505 700
80 971
387 772
468 505
594 721
850 899
142 725
174 883
501 748
16 359
288 373
160 771
782 871
211 500
942 949
699 976
205 496
106 629
338 355
77 78
217 822
862 983
660 695
456 691
193 500
85 746
92 847
231 586
465 710
579 834
245 648
456 467
733 890
183 920
542 979
302 659
149 240
534 639
306 887
99 116
690 865
6 141
549 810
614 919
260 373
286 667
37 296
27 654
200 949
832 929
325 716
273 640
117 706
86 853
464 739
338 641
362 475
669 764
186 307
451 734
332 991
141 894
297 378
305 388
691 706
82 259
347 954
320 815
7 744
484 817
701 834
754 885
31 958
303 948
881 888
24 469
257 378
585 790
743 838
951 964
349 920
408 595
11 662
581 754
45 712
102 707
498 573
409 870
64 127
713 912
815 980
23 920
582 711
60 695
242 455
195 516
128 363
497 754
367 796
108 727
215 856
526 789
193 916
29 734
2 547
361 370
456 593
496 965
296 321
528 789
884 945
289 838
131 866
876 923
264 879
336 885
304 385
267 924
377 416
37 462
492 607
691 790
705 882
325 936
13 46
480 847
252 365
338 405
410 653
328 939
403 408
317 902
600 709
86 557
224 711
136 285
253 686
23 538
81 736
654 727
555 598
426 821
244 691
349 530
111 826
760 841
228 893
314 897
455 648
141 452
358 391
85 98
433 858
611 962
10 679
1 172
146 307
327 876
129 814
850 977
35 170
35 324
528 797
517 866
124 527
199 776
169 426
209 844
123 720
709 922
350 609
442 493
56 849
42 979
168 383
147 274
433 462
741 922
668 917
658 877
297 338
95 314
16 973
477 502
133 566
525 978
131 580
165 898
569 680
187 224
738 939
91 558
200 635
81 966
53 204
270 341
148 911
264 781
165 604
146 201
100 395
825 944
518 551
530 943
838 911
532 887
84 993
117 906
73 234
45 176
513 892
316 895
375 562
78 417
827 872
247 560
163 666
360 809
70 665
74 563
172 357
312 401
467 510
39 52
288 715
198 549
750 983
151 288
233 604
598 729
621 682
484 639
39 920
406 943
654 895
168 871
328 909
264 547
280 291
87 740
99 938
613 732
84 835
256 391
50 361
116 611
158 937
405 572
75 346
412 531
112 815
440 877
311 758
156 235
368 561
842 931
33 474
925 930
32 79
726 963
60 125
185 398
191 332
186 601
472 857
289 540
397 626
157 214
351 476
391 524
285 296
396 825
155 988
6 645
816 851
17 144
93 468
93 554
371 470
466 765
74 393
335 576
265 622
291 616
123 210
811 898
682 829
258 901
210 229
43 830
256 271
437 504
731 986
64 201
16 803
302 925
8 957
35 892
276 373
732 795
35 764
234 535
560 625
415 642
89 940
460 763
796 799
660 969
659 884
851 870
161 550
138 155
545 584
218 327
210 323
135 158
102 479
441 540
612 783
209 850
675 796
361 882
80 593
500 959
322 361
392 901
49 878
429 762
392 915
242 811
655 846
513 910
417 470
275 942
371 712
820 997
29 484
365 890
110 487
558 913
399 574
285 354
321 492
412 739
192 593
521 700
279 678
546 893
808 857
97 524
7 572
218 407
60 647
422 469
805 846
331 546
426 941
364 707
114 471
321 870
518 851
402 605
58 803
366 839
100 117
202 481
249 572
418 923
197 424
456 891
184 295
310 349
90 683
130 615
183 508
418