QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#424931#5029. 在路上Estelle_N39 961ms53192kbC++142.0kb2024-05-29 19:59:562024-05-29 19:59:57

Judging History

你现在查看的是最新测评结果

  • [2024-05-29 19:59:57]
  • 评测
  • 测评结果:39
  • 用时:961ms
  • 内存:53192kb
  • [2024-05-29 19:59:56]
  • 提交

answer

#include "path.h"
#include <cstdio>
#include <cstdlib>
#include <algorithm>

using namespace std;

const int N = 300005;

int n, cnt, tot, a[N], b[N], p[N], q[N];

int solve(int x, int y)
{
	cnt = tot = 0;
	for(int i = 1; i <= n; ++ i)
		a[i] = b[i] = 0;

	for(int i = 1; i <= n; ++ i)
	{
		if(i == x || i == y)
			continue;
		int u = ask(i, x, y);
		if(u == 0)
			a[i] = 0, p[++cnt] = i;
		else if(u == i)
			a[i] = 1, q[++tot] = i, p[++cnt] = i;
		else if(u == x)	
			a[i] = 2;
		else
			a[i] = 3;
	}

	if(!cnt) 
		return -1;

	int z = p[rand() % cnt + 1], u, v = x, w = y;
	for(int i = 1; i <= tot; ++ i)
	{
		if(q[i] == z)
			u = q[i];
		else
		{
			int t1 = ask(z, q[i], v), t2 = ask(z, q[i], w);
			if(t1 == q[i] && t2 == q[i])
				u = q[i];
			else if(t1 == q[i])
				v = q[i];
			else if(t2 == q[i])
				w = q[i];
		}
	}

	int s1 = 1;
	for(int i = 1; i <= n; ++ i)
		if(i != u && i != v)
			if(ask(i, v, u) == v)
				++ s1, b[i] = 1;

	if(s1 > n / 2)
		return solve(x, u);
	
	int s2 = 1;
	for(int i = 1; i <= n; ++ i)
		if(i != u && i != w)
			if(ask(i, w, u) == w)
				++ s2, b[i] = 1;

	if(s2 > n / 2)
		return solve(y, u);

	if(n - s1 - s2 - 1 <= n / 2)
		return u;
	
	int sum = 0, k = 0;
	b[v] = b[w] = 1;
	for(int i = 1; i <= n; ++ i)
	{
		if(b[i] || i == u)
			continue;
		if(sum == 0)
			k = i, ++ sum;
		else
		{
			if(ask(i, u, k) != u)
				++ sum;
			else
				-- sum;
		}
	}

	sum = 1;
	for(int i = 1; i <= n; ++ i)
		if(!b[i] && i != u && i != k && ask(i, u, k) != u)
			++ sum;
	
	if(sum > n / 2)
		return -1;

	return u;
}

int centroid(int id, int N, int M)
{
	if(id == 1)
		return ask(1, 2, 3);

	n = N;
	int x = rand() % n + 1, y = rand() % n + 1;
	while(x == y)
		y = rand() % n + 1;
	int u = solve(x, y);
	while(u == -1)
	{
		x = rand() % n + 1;
		y = rand() % n + 1;
		while(x == y)
			y = rand() % n + 1;
		u = solve(x, y);
	}

	// printf("%d\n", u);
	return u;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 2
Accepted

Test #1:

score: 2
Accepted
time: 0ms
memory: 14016kb

input:

1 100 100
3
1 2
3
1 2
3
3 1
3
1 2
3
1 2
3
3 1
3
1 2
3
3 1
3
1 2
3
3 1
3
3 1
3
3 1
3
3 1
3
3 1
3
3 1
3
3 1
3
3 1
3
1 2
3
1 2
3
3 1
3
3 1
3
1 2
3
3 1
3
3 1
3
1 2
3
3 1
3
3 1
3
1 2
3
3 1
3
3 1
3
3 1
3
1 2
3
1 2
3
3 1
3
3 1
3
1 2
3
1 2
3
1 2
3
1 2
3
3 1
3
3 1
3
3 1
3
1 2
3
1 2
3
1 2
3
3 1
3
3 1
3
3 1
3
...

result:

ok correct

Subtask #2:

score: 8
Accepted

Test #2:

score: 8
Accepted
time: 5ms
memory: 16264kb

input:

2 10 10000000
999
60 112 98 509 586 175 588 875 861 516 920 370 781 249 999 649 292 308 934 949 437 92 506 752 547 866 869 510 984 228 104 612 202 630 360 809 56 107 566 448 940 726 146 299 941 50 319 794 670 603 365 492 728 872 829 942 451 632 373 106 909 25 306 995 735 99 568 673 75 573 383 407 56...

result:

ok correct

Test #3:

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

input:

2 10 10000000
999
60 112 98 509 586 175 588 875 861 516 920 370 781 249 999 649 292 308 934 949 437 92 506 752 547 866 869 510 984 228 104 612 202 630 360 809 56 107 566 448 940 726 146 299 941 50 319 794 670 603 365 492 728 872 829 942 451 632 373 106 909 25 306 995 735 99 568 673 75 573 383 407 56...

result:

ok correct

Test #4:

score: 0
Accepted
time: 3ms
memory: 16240kb

input:

2 10 10000000
999
60 112 959 68 586 835 91 836 634 516 272 912 781 249 655 11 466 103 934 816 904 92 576 83 687 435 871 510 758 519 842 882 339 221 2 917 5 605 477 448 323 723 744 494 941 50 668 751 670 336 365 95 877 159 829 957 451 632 591 616 909 83 452 607 735 99 22 570 755 354 172 711 742 870 3...

result:

ok correct

Test #5:

score: 0
Accepted
time: 10ms
memory: 18152kb

input:

2 10 10000000
999
373 769 355 568 586 175 588 836 203 901 272 948 781 80 655 11 292 103 934 595 904 188 865 989 698 493 871 510 893 228 842 882 339 630 2 550 829 107 477 636 385 726 146 299 764 670 668 381 631 336 365 95 974 872 829 733 678 669 373 571 183 752 452 607 735 179 22 673 755 354 383 711 ...

result:

ok correct

Test #6:

score: 0
Accepted
time: 0ms
memory: 18188kb

input:

2 10 10000000
999
688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 68...

result:

ok correct

Test #7:

score: 0
Accepted
time: 0ms
memory: 16252kb

input:

2 10 10000000
999
688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 68...

result:

ok correct

Test #8:

score: 0
Accepted
time: 3ms
memory: 18264kb

input:

2 10 10000000
999
158 826 595 867 47 385 664 154 455 857 622 561 166 780 801 763 33 310 605 36 199 718 762 911 419 109 947 369 861 841 902 657 172 175 461 814 473 43 90 875 62 238 669 791 68 435 405 663 756 255 628 798 745 878 257 773 652 662 832 735 75 363 129 359 230 351 667 873 602 783 988 253 58...

result:

ok correct

Test #9:

score: 0
Accepted
time: 0ms
memory: 18156kb

input:

2 10 10000000
999
279 772 39 665 622 173 514 309 407 623 288 342 100 529 202 417 132 611 186 430 634 796 454 842 92 53 977 712 975 158 654 66 822 452 6 333 596 593 91 119 242 503 190 82 97 575 663 574 75 598 299 334 31 147 382 988 702 11 801 338 164 696 573 182 899 948 507 168 331 939 442 137 581 52...

result:

ok correct

Test #10:

score: 0
Accepted
time: 3ms
memory: 18212kb

input:

2 10 10000000
999
60 208 208 208 208 175 208 875 861 208 208 370 208 208 208 208 292 208 208 949 208 208 208 752 547 208 869 510 208 208 208 612 208 208 360 809 208 107 208 448 208 208 208 208 941 208 319 794 208 603 208 208 208 208 208 208 451 208 373 106 208 25 306 208 735 99 208 673 208 573 383 2...

result:

ok correct

Test #11:

score: 0
Accepted
time: 5ms
memory: 18224kb

input:

2 10 10000000
999
60 208 208 208 208 175 208 875 861 208 208 370 208 208 208 208 292 208 208 949 208 208 208 752 547 208 869 510 208 208 208 612 208 208 360 809 208 107 208 448 208 208 208 208 941 208 319 794 208 603 208 208 208 208 208 208 451 208 373 106 208 25 306 208 735 99 208 673 208 573 383 2...

result:

ok correct

Test #12:

score: 0
Accepted
time: 0ms
memory: 16192kb

input:

2 10 10000000
999
198 236 761 86 644 189 7 741 274 656 547 36 825 827 740 333 896 832 575 37 359 456 833 590 427 837 100 60 424 237 208 742 266 543 941 906 422 423 953 787 397 337 215 469 979 51 404 546 603 168 849 472 737 135 500 701 608 696 764 695 64 590 851 194 89 278 864 314 529 165 448 414 471...

result:

ok correct

Test #13:

score: 0
Accepted
time: 0ms
memory: 16124kb

input:

2 10 10000000
999
198 236 761 86 644 189 7 741 274 656 547 36 825 827 740 333 896 832 575 37 359 456 833 590 427 837 100 60 424 237 208 742 266 543 941 906 422 423 953 787 397 337 215 469 979 51 404 546 603 168 849 472 737 135 500 701 608 696 764 695 64 590 851 194 89 278 864 314 529 165 448 414 471...

result:

ok correct

Test #14:

score: 0
Accepted
time: 7ms
memory: 18180kb

input:

2 10 10000000
999
60 112 98 509 586 175 588 875 861 516 920 370 781 249 999 649 292 308 934 949 437 92 506 752 547 866 869 510 984 228 338 612 202 630 360 809 56 107 566 448 940 726 146 299 941 50 319 794 670 603 365 492 728 872 829 942 451 632 373 106 909 25 306 995 735 99 568 673 75 573 383 407 56...

result:

ok correct

Test #15:

score: 0
Accepted
time: 4ms
memory: 16328kb

input:

2 10 10000000
999
60 112 98 509 586 175 588 875 861 516 920 370 781 249 999 649 292 308 934 949 437 92 506 752 547 866 869 510 984 228 991 612 202 630 360 809 56 107 566 448 940 726 146 299 941 50 319 794 670 603 365 492 728 872 829 942 451 632 373 106 909 25 306 995 735 99 568 673 75 573 383 407 56...

result:

ok correct

Test #16:

score: 0
Accepted
time: 4ms
memory: 18184kb

input:

2 10 10000000
999
60 112 125 509 291 175 588 875 861 516 920 370 781 618 999 649 292 45 934 949 437 92 506 752 547 866 869 510 208 991 338 612 208 630 360 809 56 107 737 448 940 726 208 291 941 50 319 794 670 603 365 618 291 159 829 942 451 632 373 106 847 25 306 125 735 99 568 673 642 573 383 338 5...

result:

ok correct

Test #17:

score: 0
Accepted
time: 3ms
memory: 18244kb

input:

2 10 10000000
999
60 112 338 509 847 175 588 875 861 516 920 370 781 249 999 649 292 618 934 949 437 92 506 752 547 866 869 510 125 291 515 612 737 630 360 809 56 107 208 448 940 726 515 338 941 50 319 794 670 603 365 125 125 515 829 942 451 632 373 106 902 25 306 515 735 99 568 673 907 573 383 291 ...

result:

ok correct

Test #18:

score: 0
Accepted
time: 0ms
memory: 16180kb

input:

2 10 10000000
999
60 736 736 736 736 175 736 875 861 736 736 370 736 736 736 736 292 736 736 949 736 736 736 752 547 736 869 510 736 736 736 612 736 736 360 809 736 107 736 448 736 736 736 736 941 736 319 794 736 603 736 736 736 736 736 736 451 736 373 106 736 25 306 736 735 99 736 673 736 573 383 7...

result:

ok correct

Test #19:

score: 0
Accepted
time: 0ms
memory: 20256kb

input:

2 10 10000000
999
60 736 736 736 736 175 736 875 861 736 736 370 736 736 736 736 292 736 736 949 736 736 736 752 547 736 869 510 736 736 736 612 736 736 360 809 736 107 736 448 736 736 736 736 941 736 319 794 736 603 736 736 736 736 736 736 451 736 373 106 736 25 306 736 735 99 736 673 736 573 383 7...

result:

ok correct

Test #20:

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

input:

2 10 10000000
999
60 825 542 207 182 175 71 875 861 275 642 370 725 600 184 242 292 978 56 949 189 839 896 752 547 479 869 510 328 592 288 612 373 975 360 809 317 107 642 448 822 742 200 947 941 614 319 794 580 603 473 760 89 872 342 160 451 326 373 106 488 25 306 39 735 99 533 673 94 573 383 473 56...

result:

ok correct

Test #21:

score: 0
Accepted
time: 4ms
memory: 18296kb

input:

2 10 10000000
999
60 702 344 961 410 175 657 875 861 502 500 370 194 97 850 849 292 681 289 949 574 375 233 752 547 708 869 510 457 80 683 612 752 653 360 809 64 107 127 448 941 704 685 448 941 535 319 794 945 603 901 318 460 388 672 460 451 946 373 106 10 25 306 318 735 99 502 673 304 573 383 227 5...

result:

ok correct

Subtask #3:

score: 12
Accepted

Test #22:

score: 12
Accepted
time: 74ms
memory: 18228kb

input:

3 100 10000000
999
328 852 537 953 554 506 483 192 443 912 989 346 935 232 652 528 261 899 131 531 81 686 815 543 991 810 576 639 670 572 604 842 546 322 916 97 510 160 238 696 882 214 212 194 102 964 719 255 416 260 687 148 225 664 105 100 913 600 921 203 571 406 752 189 929 716 523 809 666 589 235...

result:

ok correct

Test #23:

score: 0
Accepted
time: 73ms
memory: 20212kb

input:

3 100 10000000
999
603 168 694 35 890 839 431 506 172 225 322 14 231 221 387 802 768 786 858 954 214 929 553 795 917 554 453 983 112 196 5 428 421 149 960 294 875 380 900 914 135 141 398 480 716 377 693 832 582 629 59 975 998 513 351 193 293 328 677 96 338 39 569 236 243 849 254 418 877 413 7 675 69...

result:

ok correct

Test #24:

score: 0
Accepted
time: 79ms
memory: 18252kb

input:

3 100 10000000
999
232 191 603 626 730 411 104 65 39 494 691 185 208 192 567 818 210 162 385 511 733 860 72 765 262 635 485 516 768 426 641 477 334 92 555 520 173 296 621 80 312 695 168 760 182 556 716 457 123 718 147 474 246 9 221 369 266 912 365 247 575 86 120 584 755 525 527 276 623 323 572 550 1...

result:

ok correct

Test #25:

score: 0
Accepted
time: 87ms
memory: 18196kb

input:

3 100 10000000
999
37 333 429 430 950 395 199 67 394 239 625 725 586 176 839 401 226 14 898 931 541 738 560 638 302 457 846 468 193 423 215 692 746 262 722 43 869 984 510 181 977 809 805 327 22 444 208 768 47 372 946 20 958 863 147 409 224 95 466 694 837 167 195 949 778 24 126 953 852 480 730 365 13...

result:

ok correct

Test #26:

score: 0
Accepted
time: 66ms
memory: 16272kb

input:

3 100 10000000
999
289 402 626 749 480 763 773 565 829 569 200 303 980 734 514 539 440 769 674 130 102 117 798 994 919 493 149 456 109 121 587 835 386 851 657 268 67 382 612 792 541 883 742 436 403 968 872 60 983 260 76 550 571 158 635 428 877 807 681 604 513 598 459 218 173 599 683 308 727 221 733 ...

result:

ok correct

Subtask #4:

score: 17
Accepted

Test #27:

score: 17
Accepted
time: 85ms
memory: 18208kb

input:

4 100 10000000
999
710 227 715 954 623 585 538 236 363 913 540 3 897 998 726 919 976 843 796 69 415 705 647 707 201 696 993 545 325 375 47 260 490 385 828 162 29 278 867 593 395 219 178 518 999 685 307 772 224 187 557 89 575 524 1 157 230 341 708 978 473 995 15 179 743 416 263 640 4 851 520 719 679 ...

result:

ok correct

Test #28:

score: 0
Accepted
time: 85ms
memory: 18268kb

input:

4 100 10000000
999
714 793 831 566 274 202 861 272 583 533 805 725 138 636 832 242 737 219 191 168 939 364 439 770 290 84 581 419 991 431 892 387 487 753 368 627 900 476 934 316 854 802 898 48 741 182 950 684 121 881 996 120 917 311 386 63 377 300 734 333 789 257 797 134 668 490 649 843 795 198 462 ...

result:

ok correct

Test #29:

score: 0
Accepted
time: 65ms
memory: 18224kb

input:

4 100 10000000
999
118 434 443 62 975 789 284 936 885 652 937 50 912 733 854 532 772 709 407 312 535 589 419 247 190 474 469 905 165 889 13 159 189 746 837 603 181 335 880 513 496 897 887 442 498 656 838 342 522 93 771 816 178 541 788 215 586 794 267 297 938 853 244 255 640 654 101 470 621 232 162 8...

result:

ok correct

Test #30:

score: 0
Accepted
time: 60ms
memory: 18284kb

input:

4 100 10000000
999
418 71 357 515 696 936 943 436 645 53 344 262 706 201 896 877 732 738 433 684 891 641 264 615 32 659 990 529 219 165 81 420 22 61 35 704 233 339 201 42 816 126 522 561 960 673 452 720 99 328 222 423 804 226 266 652 291 939 981 503 209 275 653 525 812 886 693 343 881 353 218 227 28...

result:

ok correct

Test #31:

score: 0
Accepted
time: 11ms
memory: 18128kb

input:

4 100 10000000
999
388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 3...

result:

ok correct

Test #32:

score: 0
Accepted
time: 11ms
memory: 18168kb

input:

4 100 10000000
999
195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 195 1...

result:

ok correct

Test #33:

score: 0
Accepted
time: 25ms
memory: 20352kb

input:

4 100 10000000
999
962 472 490 254 571 779 648 83 213 290 889 914 69 311 578 495 455 361 519 832 796 230 588 172 320 357 123 142 703 590 9 669 728 63 829 749 585 11 131 478 744 657 605 614 942 267 108 587 852 148 491 757 256 450 739 16 174 556 94 810 582 426 562 482 629 699 529 152 278 176 696 443 1...

result:

ok correct

Test #34:

score: 0
Accepted
time: 23ms
memory: 18280kb

input:

4 100 10000000
999
331 37 14 256 432 435 352 197 67 971 655 165 874 457 295 488 626 393 163 563 4 429 747 656 765 513 516 290 380 444 519 302 829 781 74 981 557 880 828 200 135 213 928 711 574 487 575 477 134 239 17 349 269 751 552 853 668 558 625 789 921 553 114 677 187 775 333 379 670 314 88 472 7...

result:

ok correct

Test #35:

score: 0
Accepted
time: 16ms
memory: 18204kb

input:

4 100 10000000
999
934 685 993 853 853 853 219 485 853 283 784 756 242 853 853 163 759 277 278 853 438 853 657 412 853 853 707 13 853 853 853 853 166 715 853 853 853 853 853 724 853 392 853 858 121 853 630 853 760 974 428 853 853 853 429 853 565 226 853 853 853 179 853 853 796 308 853 853 717 466 81...

result:

ok correct

Test #36:

score: 0
Accepted
time: 15ms
memory: 18148kb

input:

4 100 10000000
999
477 839 786 681 539 786 786 786 786 786 786 786 590 321 786 786 872 161 332 786 786 786 786 822 786 786 786 786 786 170 940 134 240 786 835 786 874 18 786 786 786 786 786 957 396 327 786 786 786 414 786 581 310 772 494 786 53 786 158 786 786 786 786 107 786 780 786 602 786 786 786...

result:

ok correct

Test #37:

score: 0
Accepted
time: 16ms
memory: 18180kb

input:

4 100 10000000
999
341 29 528 986 538 636 447 736 829 779 895 91 65 935 906 951 792 365 63 225 865 698 965 968 147 943 508 920 264 573 774 461 452 746 676 131 386 288 830 350 14 34 109 15 902 634 617 203 514 929 61 904 91 612 395 341 533 451 528 343 588 561 944 885 536 693 518 374 557 909 821 692 55...

result:

ok correct

Test #38:

score: 0
Accepted
time: 16ms
memory: 16188kb

input:

4 100 10000000
999
486 941 230 676 428 764 770 818 395 249 216 478 847 572 704 736 396 224 283 532 9 246 70 902 991 567 479 750 476 119 219 365 886 388 129 717 477 474 525 891 479 783 390 20 674 327 246 301 81 141 241 540 805 600 903 205 210 519 826 337 75 292 821 889 204 943 404 681 192 151 926 389...

result:

ok correct

Test #39:

score: 0
Accepted
time: 69ms
memory: 18332kb

input:

4 100 10000000
999
389 534 84 413 146 244 857 715 990 427 543 685 100 541 123 645 388 933 312 237 97 896 219 74 353 638 968 778 341 908 577 727 199 344 709 423 248 950 280 901 969 277 686 571 613 257 620 691 326 974 653 167 317 380 398 647 409 201 272 63 295 938 507 293 13 462 443 374 298 679 842 51...

result:

ok correct

Test #40:

score: 0
Accepted
time: 73ms
memory: 18184kb

input:

4 100 10000000
999
771 450 489 19 87 441 961 683 425 538 895 731 131 513 791 827 589 971 226 463 654 509 858 70 274 351 698 777 644 746 839 142 626 209 173 728 954 906 924 541 333 381 312 892 571 816 822 451 519 56 76 500 498 103 745 447 663 983 176 753 431 741 205 473 763 456 392 199 660 899 699 72...

result:

ok correct

Test #41:

score: 0
Accepted
time: 42ms
memory: 16176kb

input:

4 100 10000000
999
316 890 806 250 616 350 615 881 411 598 168 879 486 884 191 940 138 510 426 376 412 454 609 329 904 971 250 354 382 26 966 636 772 315 440 703 15 563 388 622 137 631 298 857 567 851 771 443 892 724 134 12 552 874 331 419 200 141 928 746 974 815 460 117 340 518 290 689 250 998 239 ...

result:

ok correct

Test #42:

score: 0
Accepted
time: 42ms
memory: 18296kb

input:

4 100 10000000
999
599 130 583 659 197 404 414 397 494 129 654 573 944 517 729 217 5 243 168 50 113 206 609 475 765 879 363 968 217 876 126 850 260 629 421 999 194 855 198 514 779 602 371 833 303 237 974 433 28 788 496 220 30 8 467 219 709 518 615 70 513 146 245 269 567 886 586 399 44 143 299 402 42...

result:

ok correct

Test #43:

score: 0
Accepted
time: 11ms
memory: 16280kb

input:

4 100 10000000
999
717 490 563 276 717 717 871 809 935 717 338 717 717 717 96 717 313 717 717 649 523 717 717 717 723 717 210 410 717 812 846 282 717 717 717 717 717 811 357 444 717 110 857 747 375 728 572 717 967 717 257 150 717 132 947 718 717 201 299 717 717 486 182 717 717 544 189 204 717 717 71...

result:

ok correct

Test #44:

score: 0
Accepted
time: 17ms
memory: 18204kb

input:

4 100 10000000
999
78 867 132 224 132 71 347 299 132 132 132 132 534 827 132 7 806 656 771 132 319 132 132 932 132 132 76 490 804 132 373 132 945 132 132 852 132 132 489 132 803 65 918 530 985 132 132 654 230 30 682 182 820 132 132 132 112 70 132 132 132 814 132 540 688 132 132 132 34 844 866 300 13...

result:

ok correct

Test #45:

score: 0
Accepted
time: 55ms
memory: 16228kb

input:

4 100 10000000
999
375 500 386 299 753 439 382 948 269 694 25 408 62 60 399 845 939 654 325 686 314 781 176 199 960 494 751 727 856 447 908 870 861 624 362 463 331 87 182 947 573 651 411 787 820 454 151 161 204 624 931 322 912 85 127 267 894 643 688 25 218 407 71 786 848 697 15 719 98 246 914 516 60...

result:

ok correct

Test #46:

score: 0
Accepted
time: 65ms
memory: 18144kb

input:

4 100 10000000
999
386 628 767 683 110 693 376 418 122 929 572 507 522 625 642 939 859 453 85 886 461 153 416 752 436 399 56 996 383 70 161 828 671 501 210 50 645 153 371 518 134 639 214 723 582 730 452 610 619 592 789 619 835 121 943 813 968 349 483 997 784 868 432 365 942 626 121 539 49 623 860 55...

result:

ok correct

Subtask #5:

score: 0
Wrong Answer

Test #47:

score: 0
Wrong Answer
time: 460ms
memory: 53192kb

input:

5 100 25000000
49999
3753 28650 36024 8322 47241 9061 43764 6338 45160 16765 40294 43358 37214 37535 38561 1997 7478 9543 11661 1953 7391 41171 43559 9981 24218 13155 22152 45216 30123 1843 20703 23601 42707 6449 40356 3761 32284 34584 32674 44391 41031 324 14845 6935 37071 38330 48041 1824 41182 46...

result:

wrong answer too many queries

Subtask #6:

score: 0
Wrong Answer

Test #52:

score: 0
Wrong Answer
time: 746ms
memory: 27140kb

input:

6 100 40000000
9999
3929 7460 4617 7377 498 7572 4628 3661 2404 9179 755 4076 8531 6581 1929 9419 1498 4402 6412 712 4918 2628 798 6283 9427 9775 1472 5554 2146 9972 5228 5459 8417 6778 3121 7649 1031 7691 6270 2238 4885 6121 2099 3435 4615 9962 6384 8809 9169 4553 66 1939 8589 2029 4897 7334 2867 8...

result:

wrong answer too many queries

Subtask #7:

score: 0
Wrong Answer

Test #72:

score: 0
Wrong Answer
time: 730ms
memory: 31172kb

input:

7 50 40000000
29999
12447 18709 13054 17585 8337 14953 7985 1930 24383 1787 2543 26860 12198 2842 14256 8665 17034 6429 14773 8646 27093 6362 29357 18001 10667 8445 6671 21435 27163 14604 19875 745 20772 6696 16391 15560 16789 10983 6199 23133 13 13688 14547 8390 4398 21653 14460 690 24385 5358 2213...

result:

wrong answer too many queries

Subtask #8:

score: 0
Wrong Answer

Test #92:

score: 0
Wrong Answer
time: 961ms
memory: 39100kb

input:

8 100 50000000
29999
8375 16777 16700 20953 11899 14682 20874 25860 28858 23241 5089 8044 25448 17746 5605 3087 9145 20179 1080 22944 27383 8384 19943 15371 27572 7882 23028 10474 18744 20202 15687 17001 7543 18709 23165 15713 17032 29011 22353 17455 26045 3484 20330 15159 21274 382 23927 20114 6303...

result:

wrong answer too many queries