CT25431

Last crates of Wheelwright

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

The harbor bell rings at the jade shrine of Serpentis; Wheelwright weighs the day's crates manifests and starts the calculations. 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 <= 467; -1000000000 <= a[i] <= 1000.

Example 1:

Input: 210 -947072695 -268952394 -938956785 -170685123 -695730333 -752165768 -60195289 -363290785 -222804108 -654111549 -757708626 -859599424 -119467281 -484830180 -231575718 -762478524 -282053575 -352742852 -604632231 -626810996 -884222860 -669289613 -124855239 -593890281 -830622504 -647446534 -806578629 -204655941 -113691994 -692644572 -704265623 -765529107 -886720329 -34280597 -651136373 -870069965 -791437120 -716115873 -628891484 -979508085 -233236727 -248996945 -979177479 -536298266 -999908475 -282402437 -170953942 -498089172 -855534974 -324305700 -668674799 -749904823 -521096777 -126107900 -54630859 -748500618 -440061224 -471532197 -348629239 -165238384 -899375923 -818306574 -988676817 -752108403 -395865028 -63104438 -845019469 -869800576 -377140311 -969911695 -17214161 -733713066 -98444550…
Output: 31334

Example 2:

Input: 172 -859434048 -308867320 -108721861 -189305437 -857121839 -470982677 -123494111 -746953514 -203401510 -653544179 -117539220 -363831962 -163651149 -158401910 -696356888 -405518103 -807513211 -80333486 -121180582 -404664701 -742533793 -529403094 -632131956 -553697381 -572755687 -929727858 -464118576 -578280461 -441822826 -346677814 -117715795 -492801828 -575982738 -250301695 -102973859 -571607014 -485628007 -61782738 -920474852 -886989444 -62714011 -253513013 -822386130 -493658056 -471076798 -437390738 -473942301 -21781254 -840717324 -800647291 -175330294 -242418970 -666759189 -243746914 -773965364 -420853385 -696029543 -282981657 -359598290 -559156606 -375025489 -915561200 -11688229 -304759683 -50475436 -10612262 -213987296 -760894599 -982937475 -666549085 -466668212 -576201953 -919264636 …
Output: 146

Example 3:

Input: 409 -885864560 -488269293 -633717597 -501006701 -391368735 -517717375 -405965368 -80287449 -332000896 -754252761 -541917476 -692176546 -390805590 -786506487 -5285399 -410257604 -555382913 -269968793 -793353680 -654271513 -138973128 -487621595 -495480373 -976983299 -233233552 -396112105 -343879067 -423848400 -778004355 -929709987 -752292060 -779972793 -870546469 -395215308 -7332917 -312260003 -28626490 -345306316 -932927790 -371550180 -798995710 -928822820 -157373600 -161056262 -757163575 -148782948 -597367043 -583944774 -771391841 -805979618 -256250437 -584133795 -51730160 -93507691 -388965799 -774720345 -51244728 -368985236 -228960702 -496808518 -713510195 -704947713 -301591914 -442096989 -853026656 -252568818 -158610184 -352788387 -659456148 -851350571 -908804998 -312169034 -464145518 -3…
Output: 3911

Constraints:

2 <= n <= 467; -1000000000 <= a[i] <= 1000.

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