CT23264

The Marble Shared Marks

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

The harbor bell rings at the orchard lands of Applerun; Anaya weighs the day's shelves manifests and starts the calculations. Task: Print the number of distinct values that appear in both arrays. Input format: First line: n and m. Second line: n integers. Third line: m integers. Output format: Print the size of the intersection. Constraints: 1 <= n <= 363; 0 <= a[i],x <= 1000.

Example 1:

Input: 329 252 838 58 187 902 313 974 456 154 972 687 263 10 406 412 348 528 852 609 368 565 391 594 490 670 689 159 800 423 652 331 393 33 863 396 679 317 919 39 757 363 733 100 451 16 845 510 825 645 448 261 610 21 270 191 921 144 779 313 904 517 896 108 258 342 687 704 130 801 258 469 909 729 623 792 52 359 737 788 348 805 148 494 554 324 780 328 668 453 1000 902 888 426 352 849 730 284 281 500 375 597 127 117 170 773 494 215 852 61 823 825 134 756 947 42 615 522 136 549 597 293 913 914 624 691 974 25 761 799 232 640 368 60 570 823 634 682 342 503 219 257 601 212 20 457 134 986 612 205 748 522 713 602 400 789 774 368 132 18 501 800 849 251 151 871 536 518 289 244 378 231 321 610 79 154 420 13 30 154 955 142 918 946 567 640 313 295 279 329 815 636 762 597 204 0 652 767 653 673 360 492 105 653 5…
Output: 60

Example 2:

Input: 156 344 91 327 898 589 925 799 235 660 339 380 342 709 199 86 632 78 674 661 906 367 37 329 495 34 495 488 348 532 643 970 26 854 175 844 401 680 281 835 963 813 945 716 812 850 74 849 611 87 178 808 496 292 308 408 28 231 808 341 32 863 483 313 512 135 275 282 814 788 882 674 553 533 680 191 538 105 144 992 388 517 735 307 510 826 904 852 7 664 280 838 582 408 171 872 360 82 365 567 341 782 888 414 944 388 17 668 230 685 70 32 100 798 792 626 520 69 64 75 827 788 162 958 391 948 872 443 535 757 507 494 15 828 995 612 164 85 516 551 756 151 112 619 960 72 172 553 692 633 558 716 859 415 473 336 358 907 229 442 747 478 909 300 643 887 53 644 460 430 222 488 878 252 170 781 400 354 720 248 12 509 708 603 473 17 299 290 461 171 660 387 120 672 27 996 483 71 678 980 627 763 739 134 378 903 306…
Output: 43

Example 3:

Input: 297 269 79 170 689 312 677 819 161 852 197 502 965 439 874 934 180 169 241 295 426 139 839 978 62 137 833 233 328 63 248 36 743 752 393 150 706 801 485 319 206 602 688 399 755 126 337 451 892 53 414 212 440 662 42 624 669 805 165 249 249 879 9 91 885 625 726 129 78 717 17 682 944 847 98 607 406 500 701 402 518 505 860 579 804 349 227 850 471 294 533 672 546 288 578 310 267 995 433 221 891 22 84 608 881 531 414 767 271 29 306 505 4 286 222 343 833 932 946 151 549 664 607 422 481 995 784 40 300 152 714 408 924 655 874 357 939 643 152 443 177 117 975 762 371 889 726 798 189 659 964 419 921 991 501 339 79 626 243 176 576 55 837 222 543 727 278 820 336 264 282 890 665 292 11 704 290 187 609 656 868 671 830 895 298 535 927 409 190 971 800 365 544 530 219 215 66 870 467 123 614 622 615 560 231 10…
Output: 64

Constraints:

1 <= n <= 363; 0 <= a[i],x <= 1000.

Loading...
Test Cases:No test cases
No test cases available.
The Marble Shared Marks - EASY Coding Problem | CodeTikki