CT25052

The Jasper Shared Marks

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Before the gates of the lantern lake of Firefly Mere close for winter, Vani must finish the registers ledger - one figure at a time. 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 <= 571; 0 <= a[i],x <= 1000000.

Example 1:

Input: 344 326 989562 802079 503226 914924 835482 965895 915849 904047 673008 15937 569500 879925 754670 546887 816834 564439 456308 535140 479195 694225 274118 405043 327725 43762 674197 959591 86363 111125 930450 841266 371489 373032 823960 706431 284737 231605 844776 66754 722348 370150 876561 98035 8481 228565 864093 904007 276187 378290 930454 153679 5738 117067 140579 372526 209945 762781 537358 640369 515511 256386 190381 192381 174713 340718 798796 542909 828417 607571 512178 426374 934592 91415 459208 520021 100340 569713 546408 51816 63997 556313 557426 86793 383999 815095 123536 798903 831288 308538 632230 951539 414865 483809 7832 128879 94713 76568 211319 848221 260294 617326 830636 330548 984403 565458 957842 350256 574682 30318 710061 508434 127984 392441 249446 271266 621914 83651…
Output: 0

Example 2:

Input: 429 159 295685 43671 604385 634688 404623 454591 492359 967682 507327 72151 303607 62552 370111 78072 4623 605305 843543 742923 530987 94057 46339 524591 678490 34228 392477 649502 173275 613957 941244 576603 147542 806986 449207 137647 475711 797322 630074 709737 454890 4145 612447 193892 132383 129508 280765 823705 354093 308063 576079 714744 640639 956366 589523 475444 529746 722752 30128 549107 652199 62087 466377 620220 902312 768611 713626 13615 558601 308612 93908 447251 385228 290515 310648 289114 250624 534342 712932 274557 270350 749393 79785 955424 337744 618689 763793 243096 52656 852799 82145 990547 661161 10460 981195 414958 732633 143445 775841 102168 597359 684404 995964 267498 673858 946308 189898 345351 319366 52202 170344 653055 500638 321050 744569 724900 638469 466839 …
Output: 0

Example 3:

Input: 505 543 621992 743367 896021 57772 465288 143565 116436 192979 200267 657539 957413 849430 145259 166011 148826 928195 138519 492193 697404 212297 659628 447783 706795 409329 721556 327702 227053 905622 803027 595803 47071 276906 222784 802309 585869 913673 885606 386226 997228 506395 604038 770055 472952 268293 560572 883637 699464 147627 210300 400626 296450 119520 728395 545331 769761 367181 427736 86497 789210 371124 68938 186591 707805 2709 13272 94360 133487 271545 990881 924224 279053 634751 199154 969919 465489 938078 352601 982016 737520 253321 347981 495458 647401 939854 14034 731817 190200 550892 324488 644254 167936 638273 340132 821649 91292 244920 58719 525210 90372 776180 605546 363605 578998 44233 511563 274653 684423 106015 422822 465050 48299 280705 201268 631024 780650 9…
Output: 0

Constraints:

1 <= n <= 571; 0 <= a[i],x <= 1000000.

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