CT22057

The crates at Highreach

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

The council of the mountain city of Highreach pays by the answer, and Nico intends to earn it. First: the full register of crates. 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 <= 509; -1000000000 <= a[i],x <= 1000.

Example 1:

Input: 69 460 -885309978 -223405901 -694120821 -771007240 -316898487 -754455533 -787741197 -677775770 -544338778 -235407023 -367706848 -501570891 -824141147 -869934258 -318110153 -41297305 -490225752 -873308938 -538284904 -475221987 -782877130 -485231728 -589478978 -483458375 -318125756 -177155396 -55416100 -358470083 -691908410 -923057950 -287827204 -410429195 -761274061 -357179502 -359301960 -762952343 -535396256 -850630716 -932894846 -72585082 -319307838 -873628183 -892448082 -642468680 -350403113 -672714896 -60694148 -725948705 -453099960 -734036337 -944928932 -529849811 -596291715 -5529819 -758570654 -209620681 -984660245 -392670156 -794248758 -752894190 -307106013 -432056689 -693075799 -180858702 -973703144 -385380761 -287360223 -873914957 -202221412 -308553816 -993866859 -286317119 -361871…
Output: 0

Example 2:

Input: 19 426 -340661109 -232595923 -801940047 -223398760 -834564575 -425409139 -731588439 -124050754 -781954642 -891867271 -970612590 -241221681 -809256450 -821633051 -562032175 -19670323 -667961984 -491280425 -288155575 -552723970 -343382898 -528154642 -819904998 -208351600 -64373643 -187461886 -205331292 -309031987 -852639407 -405341135 -744580158 -548552661 -152839171 -54136883 -888352152 -287702088 -836100442 -94335107 -494765610 -969708756 -135918453 -460427605 -241536302 -993530724 -300570523 -311853712 -346297664 -868269673 -489700180 -845901200 -340257071 -752082569 -769894827 -738181482 -128594109 -869317766 -365626141 -967024634 -935832018 -127724473 -494854286 -276263042 -354508581 -936407399 -84083890 -11889565 -225760667 -991789246 -973444677 -564179460 -21496842 -769262665 -5655406…
Output: 0

Example 3:

Input: 30 325 -517856485 -529189123 -51812587 -207015886 -24875571 -932347850 -205746526 -425450943 -974393002 -83721667 -866746887 -194631933 -703306972 -959906646 -79570036 -476574177 -722733000 -927367030 -442393648 -365416256 -42743788 -656568929 -577318481 -798731404 -417246601 -334574292 -304586700 -770670339 -444677908 -590845616 -241275426 -752473509 -138231410 -458949393 -396257333 -24126368 -722640712 -198457565 -284083834 -398770458 -407972850 -742133849 -191439232 -866180717 -743978960 -130329030 -812401192 -96642459 -15232999 -345050437 -445116823 -92516160 -178125473 -818930706 -670206965 -889229502 -844214825 -686452170 -916381687 -935439963 -107470713 -95490584 -144777850 -469048766 -11070606 -93665825 -42128212 -300886419 -791040090 -361961375 -908766209 -216252364 -539722830 -30…
Output: 0

Constraints:

1 <= n <= 509; -1000000000 <= a[i],x <= 1000.

Loading...
Test Cases:No test cases
No test cases available.