CT34671

The Scarlet registers of Vesper

MediumL4 · Loop LordAcceptance: 0.0%XP: 35

Morning light hits the mushroom groves of Fungaldeep as Vesper unrolls the day's manifest of registers. The tally will decide the next shipment. Task: Print the minimum absolute difference between any two array elements. Input format: First line: n (>=2). Second line: n integers. Output format: Print the minimum pairwise absolute difference. Constraints: 2 <= n <= 5126; -1000000 <= a[i] <= 1000000.

Example 1:

Input: 2576 -679672 394910 -961637 900538 119095 788597 -214539 -436165 311473 135415 -823925 729431 999524 288494 -751551 358321 255690 -497972 -771163 296829 -384123 275248 -800059 195590 -515744 911636 -206942 33670 -921217 320368 983548 -742898 -872451 -757363 -322499 -519703 -26838 704725 178524 -64480 983243 400801 -427422 916993 49142 -731562 835276 -783984 -284689 683318 952612 -672098 -464203 -91763 -554854 -473099 291524 -156453 -377248 796701 -496045 396883 572114 219115 -698838 -4272 -930544 878461 -491772 -241842 792173 612336 809169 729748 -264206 211739 232743 507159 142712 786507 920693 109099 357428 650102 622310 542106 -227286 434558 -256 -317350 -777728 242456 -837282 -373310 -427190 782506 831250 -48519 696220 -540351 376390 619184 -317012 737794 -659625 477316 -9996 846122 -4…
Output: 0

Example 2:

Input: 4256 -552774 -599285 293079 -879947 -816558 -13390 -634736 -745178 -990626 -551387 173874 -929289 595076 -997610 -320170 -290866 442844 917128 -108449 130736 759963 -810541 863248 -234741 953041 -65581 890044 884139 497174 -565305 -202069 946496 -911492 -814261 385273 -944165 603805 906800 981652 2014 929860 572311 509367 -681510 -282547 -326987 -977931 -373120 108811 -868132 -957638 405884 853453 989049 -42326 -219561 -610442 -552321 475286 687275 420762 -95787 -628420 455585 -738431 142760 -833534 117042 632271 354366 -399247 -525771 668137 979424 287902 -394088 -63703 -991386 570095 910344 -192191 -627127 -299117 757947 218889 -626620 -912439 379339 797064 -634742 -883845 -235005 -722100 -490559 788141 -434888 -2561 338275 -153156 56500 645173 375282 386985 -472047 129396 -313054 76436 …
Output: 0

Example 3:

Input: 3427 -13934 388932 -504835 456600 978607 674628 399091 408695 -599502 -358982 558741 647320 577238 523470 -935993 -742756 -396749 -694928 476519 -379623 219243 465248 -730081 350401 122402 223169 -212320 -774413 750776 -534611 -275376 -616162 823918 174473 -444247 732889 217391 971401 -692764 747532 435222 525852 -412908 363035 501 151968 -865277 502628 897024 -684966 917481 -642903 -607043 464983 -800927 -630290 -568283 -436575 -645210 -137302 -462889 -747671 306175 -960680 828985 -230396 486145 -217672 386706 388553 467788 -666464 114308 -895977 961457 -888120 -593314 506310 703550 -160302 -626944 -774059 119388 -950308 -308696 -842429 386147 947241 933687 996948 -726646 -188470 260324 120981 806810 -698438 434973 -966074 606060 31857 468441 -299939 -184531 807230 -379467 -352764 121691 …
Output: 1

Constraints:

2 <= n <= 5126; -1000000 <= a[i] <= 1000000.

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