CT26913

Last shelves of Brevin

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Deep in the quays of Driftwood, Brevin studies rows of shelves entries. One clean number will settle the guild's oldest argument. 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 <= 725; 0 <= a[i],k <= 1000000000.

Example 1:

Input: 70 753572853 979669344 641485706 360391022 609086113 526552943 705891159 816390694 309222566 751102878 189830913 424276074 64875858 270694978 990436505 797004657 564847627 587288157 843383455 601088450 737916624 70185996 909070084 327607010 113582736 114115766 812271927 575406342 255605771 842681084 338712818 188725226 59653165 718218209 179436540 437876657 61845775 978495419 677901733 489021447 62036305 833597151 925518818 388966188 373215365 717770062 313405789 396270566 320419577 221488017 813389026 3558081 473677852 68283310 261544247 222341140 197432063 1247246 580463133 522426818 567888092 191723997 471745063 640230704 942952149 200026550 499468637 767396190 182872466 946701031 649406671
Output: YES

Example 2:

Input: 627 821137357 937022082 818876491 186770154 752219835 269680158 441708337 255527299 143545769 915533317 98545872 798597995 814943101 694317997 771013622 872355964 130711683 851754884 491133868 619941974 790363951 244868503 43422520 404930033 663839113 956838760 88137905 586631440 280243944 715190496 938501120 820153948 460593229 411769054 78460208 579914353 406194556 935449488 983405889 346386099 519498230 605026803 666208506 111913714 969239056 628314995 409509975 479353846 886715471 452383226 712324452 825257913 66077336 415668314 361702927 544878610 226940736 65666749 50978875 72800303 284518846 527186813 109995810 460138241 931161733 527271703 47570444 227773860 869430447 948346668 633363604 169662476 963736214 818267027 975341723 249041338 412855901 805772081 856891523 772495612 30536…
Output: NO

Example 3:

Input: 274 1349901836 267727942 487379464 391053531 273571524 547393041 683972494 609567917 220897936 301895193 744756421 64069652 967677787 11984343 51253086 934874618 233285439 379412643 735872594 957494136 727861874 26392011 590658937 852213263 92256545 889451596 111752997 750637815 39248231 802688648 898242132 741838386 789636329 407095493 417133074 605513760 603149156 785264225 663533949 227574597 770463991 521566748 902175905 703172038 104828442 744751171 412682073 681705523 148780989 163769470 785809066 72162022 704995432 423900099 956487823 476222392 676430632 20722579 518172055 776029715 635498107 484027836 971014789 812708392 67021241 595462209 363475091 110179842 748247674 242766436 530986535 931593031 551357702 437575528 880425953 488333297 517443225 312269547 251475023 397494913 4097…
Output: NO

Constraints:

2 <= n <= 725; 0 <= a[i],k <= 1000000000.

Loading...
Test Cases:No test cases
No test cases available.
Last shelves of Brevin - EASY Coding Problem | CodeTikki