CT26973

The registers at Echo Dunes

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Legend says the vault under the singing sands of Echo Dunes opens only for a perfect tally of registers. Vani means to find out. Task: Print YES if two distinct elements sum to exactly k, otherwise NO. Input format: First line: n and k. Second line: n integers. Output format: Print YES or NO. Constraints: 2 <= n <= 531; -1000000000 <= a[i],k <= 1000000000.

Example 1:

Input: 308 368379040 -274096734 -575433104 388387820 -800326368 144514025 360083383 -755940359 884806536 221531376 734825280 245928469 -743093072 -62476711 -461473741 581635556 260299811 568832488 107792322 -826504251 769030104 -877197204 735771601 -244905505 -282655288 989896682 506458808 -347563048 676707677 943439584 363992480 -619319424 -59587543 519619347 -336166399 -105850716 -983433115 -940568749 489073163 -989561478 423125652 668603184 457198007 -581621874 520331665 -243207884 268142931 -272387867 688847809 296316170 -108875656 -513070378 558365821 -166155498 -732116094 -204875037 -98381854 608753529 529290670 -212483029 -813419507 -101085125 928662456 323270339 -675587464 -778382619 -443058280 752730193 536626310 -98911678 605527019 -553559211 974639024 65941578 655149971 -544911088 605217394 -312137971 506415651 -74412630 92018760 -395479083 539057404 -36966510 -889516294 -161252425 246328400 1705056 -138650125 -958968821 -287067565 175217851 -606322699 -29838381 537929334 -579936257 777323274 -250125212 -144969877 21505854 -330161861 115583100 791935451 936415887 -216887452 -490373139 256763021 -973325354 -684145804 -154709818 -902154865 981706213 403809294 -355122936 -953940288 -39797777 -918297217 502447263 854965675 338682461 533141637 671636002 -986165513 -262258976 -182929467 418954971 -848835271 -252379337 107028101 -375856159 710235099 695766605 -468970869 -759510839 174298751 -86909962 921101186 -146028163 238343478 -373377144 -629602296 -353141342 -984780348 716846946 414955096 -887994405 -617979399 -606144544 987977113 490205143 86733907 -722910853 597629981 -608611465 -658184751 711591734 -153747352 44328269 -500688220 573800548 -37771054 -860003904 704007951 468803051 -312640672 127209825 -163330240 -540272447 241240060 -491751722 -613767069 819498260 202868788 480746786 -597114584 -232260531 342522592 -315238819 740416617 -26852813 515955456 -723191030 345287970 918682258 -158269385 -663806620 -977071153 383419895 -725525502 -475178054 -255360337 -863311655 157220075 105186147 11328460 -33249898 -620337717 66172374 -810995844 -645679458 -1596363 440889599 -111453501 -197132269 -291978030 37327175 -977129993 999551184 51479763 429255030 629176431 -128678163 747318561 -338362300 547656942 973179343 947644147 -363178228 854143549 18409851 -396054165 -114470923 -351028571 696084142 746691737 122559190 663623712 -154906025 168920978 -298338675 406459352 -184924109 734319174 -548600258 -370408486 395231853 -858964072 -866665183 -861660253 -868624704 558242843 953753740 -883558952 -633777825 299631409 854378931 256258798 709313680 -44764581 535813790 -765997753 898367929 669229251 92222023 90998927 -438162209 149191619 107256203 -617029975 759676871 -266133083 -708918474 -422741420 -750093994 569385901 773831725 -460932037 -701701761 917640661 -103177534 -193037854 986358455 -977567423 79379863 835791125 145658702 182501015 -711170003 -233923735 -994456883 -749932495 -634817680 -183028225 -343775113 488896691 -144739160 834537648 -799738634 -97456042 -791750784 -315376447 190797909 210261167 847072542 -976123878 -185714268 603967891 -416341307 211259120 673496935 153246720 -175577898 579830975 568190312 682200015 -154372721 909286765 -49509923 -230005432
Output: YES

Example 2:

Input: 102 1933996578 -164753153 -545320256 -158642471 -156302653 -371334841 -780996076 -104818165 -525135440 478727856 323936071 -755577023 -25846861 437898531 594319734 84893798 521596552 -25053725 -579332340 -797900457 505906146 -773673273 -382112247 -837138234 -370683767 -729677028 -752492060 -204520293 -430537152 -385694069 -772434410 -961532055 45505697 458671728 -698554537 941815218 733503012 792952467 717464065 -67795445 271008845 606201441 720341924 -561229433 -64642713 -914737556 854293614 334746563 280637978 -110321731 426466223 -279218528 852647057 -78156644 -1696135 911338976 192245590 659968042 785826141 974169716 -122163501 751851619 -669228216 614688776 -957406002 -313522247 386655321 -617295087 809014461 546867510 -656795706 804082080 -658320578 -755176529 292156681 -871483144 -681828154 223218063 -959289541 -624914177 -645185600 -655289734 833581354 -724058807 412930263 504235448 67123938 58867212 -227947396 -956610029 -459042868 605327998 334447319 -761014362 -780509992 -366512966 -505764985 704528846 730664999 666322381 411126554 -834159688 123442102
Output: NO

Example 3:

Input: 92 -10917834 344664816 164702015 827835210 -679137046 719091269 616056200 -330608907 -653986014 61739171 -698235281 45576867 204182026 313485162 -303797724 519331961 707280997 -896577498 756825816 -563116640 -374130401 589984703 -45700173 242600505 727646817 602344089 875288884 76345861 -666974119 -781696969 -799638562 -927397516 136885134 -933485810 -42345684 213609046 530746839 -299080875 551544541 -168187541 351579645 567884384 -53256554 73765404 -168239503 -59189805 -371794160 285645854 492849264 -87338020 775879548 -999599421 456122363 -204322984 506406578 -505197196 985580874 504207850 -621919722 643255991 977861517 361254995 747585813 -403248862 -480361304 -972571243 906899095 833611064 -918114044 -810185133 988870403 749557160 -366024722 -835378635 -277044289 948395893 -419331703 110985210 924731851 798515801 204210336 297995702 -357368083 983239388 -226359945 805500963 -614262919 994980747 -8306408 852066797 -385374414 832268628 482718870
Output: NO

Constraints:

2 <= n <= 531; -1000000000 <= a[i],k <= 1000000000.

Loading...
Test Cases:No test cases
No test cases available.
The registers at Echo Dunes - EASY Coding Problem | CodeTikki