CT23116

Ojas's Pair Quest Ledger

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

The council of the basalt cliffs of Obsidian Shore pays by the answer, and Ojas intends to earn it. First: the full register of weights. 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 <= 434; -1000000000 <= a[i],k <= 1000.

Example 1:

Input: 63 -675630374 -422729208 -542013532 -715957313 -10855042 -16263977 -238574276 -492721015 -142049023 -752774565 -320959338 -762179800 -279362812 -157454364 -143375853 -466528632 -4850677 -427469386 -111022628 -353893116 -451358093 -274088724 -220524143 -429395346 -253255145 -136658440 -15809018 -560498937 -669423434 -59561289 -291827880 -424237596 -387903450 -725434222 -982122706 -401833379 -97350153 -98936068 -380624819 -913091518 -377597662 -565714494 -465343644 -518176010 -557172622 -721109293 -712707271 -193330078 -84008696 -753705860 -486322153 -872875083 -501834495 -664912133 -198679965 -14658321 -252756959 -472869184 -976956487 -978089302 -946496534 -457119043 -394370433 -362380820
Output: YES

Example 2:

Input: 431 -707778199 -707258984 -826629886 -618211103 -154216946 -651212080 -464663347 -787741347 -3438262 -236851248 -508768464 -391093271 -824732632 -905012777 -161291446 -828633764 -885328807 -77906911 -291330876 -865935513 -112832764 -645339903 -809275031 -404578436 -304422266 -966508974 -241683289 -975927449 -435217353 -386484569 -185253215 -441125990 -699312343 -964479789 -483027001 -246785375 -675601606 -78008192 -221730032 -865342466 -456823982 -418390229 -657181062 -625874778 -90677523 -170083566 -476893272 -433392465 -696270710 -519777040 -578718184 -125537921 -148627156 -646127053 -91711640 -190057659 -990048189 -12208766 -153304146 -149828195 -725021157 -8395264 -737526738 -870664866 -582290940 -460427151 -53642733 -522753129 -808422306 -753018138 -469495569 -871019477 -609485357 -26…
Output: NO

Example 3:

Input: 202 -557570446 -655782148 -456362262 -775638673 -929921779 -490895073 -638261438 -447191600 -365341255 -400983097 -151286967 -424265397 -249326849 -708067511 -647017934 -88314483 -223701728 -421643540 -589302047 -212769404 -74411936 -8404055 -758540714 -625198655 -19157188 -988783458 -134679031 -735452274 -894863352 -733001096 -867745987 -473655942 -408051645 -731518792 -462880621 -797300760 -322065403 -691270368 -312498984 -179584032 -361653481 -5939465 -927433588 -765666573 -53535970 -19064855 -621023440 -891865191 -159559326 -125528848 -894668983 -949296186 -201362031 -200436741 -735146444 -268036965 -304589228 -887084998 -840147622 -185187883 -829447184 -451414738 -453057446 -955557852 -492974468 -941747702 -964101224 -36984877 -948216807 -573027951 -554446084 -507757346 -601782479 -41…
Output: NO

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
Ojas's Pair Quest Ledger - EASY Coding Problem | CodeTikki