Codeforces Round 644 (Div. 3)

Solutions are presented as using the least memory and the fastest execution time. It also takes the top 10 most recent solutions from each language. If you want to limit to a specific index, click the "Solved" button and go to that problem.

ContestId
Name
Phase
Frozen
Duration (Seconds)
Relative Time
Start Time
1360 Codeforces Round 644 (Div. 3) FINISHED False 7200 141495899 May 24, 2020, 1:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 48307 ) B Honest Coach PROGRAMMING greedy sortings 800

B'There are n athletes in front of you. Athletes are numbered from 1 to n from left to right. You know the strength of each athlete -- the athlete number i has the strength s_i . You want to split all athletes into two teams. Each team must have at least one athlete, and each athlete must be exactly in one team. You want the strongest athlete from the first team to differ as little as possible from the weakest athlete from the second team. Formally, you want to split the athletes into two teams A and B so that the value | max(A) - min(B)| is as small as possible, where max(A) is the maximum strength of an athlete from team A , and min(B) is the minimum strength of an athlete from team B . For example, if n=5 and the strength of the athletes is s=[3, 1, 2, 6, 4] , then one of the possible split into teams is: In this case, the value | max(A) - min(B)| will be equal to |4-3|=1 . This example illustrates one of the ways of optimal split into two teams. Print the minimum value | max(A) - min(B)| . The first line contains an integer t ( 1 <= t <= 1000 ) -- the number of test cases in the input. Then t test cases follow. Each test case consists of two lines. The first line contains positive integer n ( 2 <= n <= 50 ) -- number of athletes. The second line contains n positive integers s_1, s_2, ldots, s_n ( 1 <= s_i <= 1000 ), where s_i -- is the strength of the i -th athlete. Please note that s values may not be distinct. For each test case print one integer -- the minimum value of | max(A) - min(B)| with the optimal split of all athletes into two teams. Each of the athletes must be a member of exactly one of the two teams. The first test case was explained in the statement. In the second test case, one of the optimal splits is A=[2, 1] , B=[3, 2, 4, 3] , so the answer i'...

Tutorials

Codeforces Round #644 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
81654173 mo_ni B May 27, 2020, 8:29 p.m. OK Clang++17 Diagnostics TESTS 3 217 5222400 800
81389325 Nonunou B May 25, 2020, 1:52 p.m. OK Clang++17 Diagnostics TESTS 3 218 0 800
81619627 rayhan50001 B May 27, 2020, 12:49 p.m. OK Clang++17 Diagnostics TESTS 3 311 3174400 800
81363277 noob_acmp B May 25, 2020, 8:35 a.m. OK Delphi TESTS 3 30 0 800
81364419 CN_NC B May 25, 2020, 8:50 a.m. OK FPC TESTS 3 31 102400 800
81404591 Sajid064 B May 25, 2020, 4:59 p.m. OK GNU C11 TESTS 3 15 0 800
81455269 Shadhin08 B May 26, 2020, 9:22 a.m. OK GNU C11 TESTS 3 15 0 800
81477207 akash19jain B May 26, 2020, 1:56 p.m. OK GNU C11 TESTS 3 15 0 800
81479389 ajoydey00001 B May 26, 2020, 2:23 p.m. OK GNU C11 TESTS 3 15 0 800
81629221 vjudge4 B May 27, 2020, 2:38 p.m. OK GNU C11 TESTS 3 15 0 800
81328345 msakib B May 24, 2020, 7:28 p.m. OK GNU C11 TESTS 3 15 0 800
81351324 aishuyadav B May 25, 2020, 5:56 a.m. OK GNU C11 TESTS 3 15 0 800
81356114 Himelcse005 B May 25, 2020, 7:01 a.m. OK GNU C11 TESTS 3 15 0 800
81397650 Itsmdshahin B May 25, 2020, 3:28 p.m. OK GNU C11 TESTS 3 15 0 800
81657945 Mr_Bin B May 27, 2020, 10:25 p.m. OK GNU C11 TESTS 3 30 0 800
81567367 Executioner_001 B May 26, 2020, 10:29 p.m. OK GNU C++11 TESTS 3 15 0 800
81486080 2_3_3 B May 26, 2020, 2:42 p.m. OK GNU C++11 TESTS 3 15 0 800
81460479 yarrow1617 B May 26, 2020, 10:34 a.m. OK GNU C++11 TESTS 3 15 0 800
81452430 countercurrent-time B May 26, 2020, 8:43 a.m. OK GNU C++11 TESTS 3 15 0 800
81447577 violen B May 26, 2020, 7:40 a.m. OK GNU C++11 TESTS 3 15 0 800
81429335 trueBatty B May 26, 2020, 1:56 a.m. OK GNU C++11 TESTS 3 15 0 800
81414852 cugel B May 25, 2020, 6:59 p.m. OK GNU C++11 TESTS 3 15 0 800
81686808 aga_xiv B May 28, 2020, 8:42 a.m. OK GNU C++11 TESTS 3 15 0 800
81620118 wolf.001.618 B May 27, 2020, 12:55 p.m. OK GNU C++11 TESTS 3 15 0 800
81614850 rifat59 B May 27, 2020, 12:01 p.m. OK GNU C++11 TESTS 3 15 0 800
81410108 yash.singh5445 B May 25, 2020, 6:05 p.m. OK GNU C++14 TESTS 3 15 0 800
81471305 deepak2299 B May 26, 2020, 12:46 p.m. OK GNU C++14 TESTS 3 15 0 800
81479989 arsator B May 26, 2020, 2:30 p.m. OK GNU C++14 TESTS 3 15 0 800
81588574 ashwinkanchana B May 27, 2020, 6:36 a.m. OK GNU C++14 TESTS 3 15 0 800
81609977 ..vince B May 27, 2020, 11:05 a.m. OK GNU C++14 TESTS 3 15 0 800
81623290 itz_rishi B May 27, 2020, 1:32 p.m. OK GNU C++14 TESTS 3 15 0 800
81686592 ____armaan____ B May 28, 2020, 8:39 a.m. OK GNU C++14 TESTS 3 15 0 800
81463976 Ahacsp B May 26, 2020, 11:21 a.m. OK GNU C++14 TESTS 3 15 0 800
81435995 JayK007 B May 26, 2020, 4:46 a.m. OK GNU C++14 TESTS 3 15 0 800
81429373 Mr_Infinity B May 26, 2020, 1:58 a.m. OK GNU C++14 TESTS 3 15 0 800
81680188 mahesh12345 B May 28, 2020, 7:19 a.m. OK GNU C++17 TESTS 3 15 0 800
81692682 doofenshhmirtz B May 28, 2020, 9:55 a.m. OK GNU C++17 TESTS 3 15 0 800
81689881 mahesh12345 B May 28, 2020, 9:20 a.m. OK GNU C++17 TESTS 3 15 0 800
81577737 Biley B May 27, 2020, 3:44 a.m. OK GNU C++17 TESTS 3 15 0 800
81467765 ahmedfahad B May 26, 2020, 12:08 p.m. OK GNU C++17 TESTS 3 15 0 800
81428751 md.muneerhasan B May 26, 2020, 1:34 a.m. OK GNU C++17 TESTS 3 15 0 800
81427525 Scum001 B May 26, 2020, 12:51 a.m. OK GNU C++17 TESTS 3 15 0 800
81425668 Strig B May 25, 2020, 11:43 p.m. OK GNU C++17 TESTS 3 15 0 800
81410279 Denvilk B May 25, 2020, 6:08 p.m. OK GNU C++17 TESTS 3 15 0 800
81389209 Pritesh_0411 B May 25, 2020, 1:50 p.m. OK GNU C++17 TESTS 3 15 0 800
81419994 parth20 B May 25, 2020, 8:25 p.m. OK GNU C++17 (64) TESTS 3 15 0 800
81424350 Ernestico B May 25, 2020, 10:33 p.m. OK GNU C++17 (64) TESTS 3 15 0 800
81425932 brunomont B May 25, 2020, 11:55 p.m. OK GNU C++17 (64) TESTS 3 15 0 800
81432229 richy6 B May 26, 2020, 3:17 a.m. OK GNU C++17 (64) TESTS 3 15 0 800
81436389 Woob B May 26, 2020, 4:55 a.m. OK GNU C++17 (64) TESTS 3 15 0 800
81514145 Ruina B May 26, 2020, 3:20 p.m. OK GNU C++17 (64) TESTS 3 15 0 800
81563927 ivan100sic B May 26, 2020, 8:45 p.m. OK GNU C++17 (64) TESTS 3 15 0 800
81568481 Sisyy B May 26, 2020, 11:19 p.m. OK GNU C++17 (64) TESTS 3 15 0 800
81591196 peroon B May 27, 2020, 7:08 a.m. OK GNU C++17 (64) TESTS 3 15 0 800
81690213 Abdelrahman_Elhawary B May 28, 2020, 9:24 a.m. OK GNU C++17 (64) TESTS 3 15 0 800
81390319 bnurgeldiyev514 B May 25, 2020, 2:04 p.m. OK Go TESTS 3 31 0 800
81579931 hoangtl B May 27, 2020, 4:29 a.m. OK Go TESTS 3 31 102400 800
81369650 amarjeetanand B May 25, 2020, 9:56 a.m. OK Go TESTS 3 46 0 800
81390350 bnurgeldiyev514 B May 25, 2020, 2:04 p.m. OK Go TESTS 3 46 0 800
81390293 bnurgeldiyev514 B May 25, 2020, 2:04 p.m. OK Go TESTS 3 46 0 800
81389023 bnurgeldiyev514 B May 25, 2020, 1:48 p.m. OK Go TESTS 3 576 0 800
81471061 XOR-star B May 26, 2020, 12:43 p.m. OK Haskell TESTS 3 62 102400 800
81427709 Russell_Emerine B May 26, 2020, 12:57 a.m. OK Haskell TESTS 3 62 102400 800
81405392 slemus B May 25, 2020, 5:09 p.m. OK Haskell TESTS 3 62 102400 800
81357931 frederick99 B May 25, 2020, 7:25 a.m. OK Haskell TESTS 3 93 102400 800
81422167 jakejase2 B May 25, 2020, 9:17 p.m. OK Java 11 TESTS 3 140 0 800
81436057 avijit_agarwal B May 26, 2020, 4:47 a.m. OK Java 11 TESTS 3 155 0 800
81577358 mr___hacker____ B May 27, 2020, 3:36 a.m. OK Java 11 TESTS 3 155 0 800
81478738 wackloner B May 26, 2020, 2:15 p.m. OK Java 11 TESTS 3 155 0 800
81344850 rajparekh2024 B May 25, 2020, 3:45 a.m. OK Java 11 TESTS 3 155 0 800
81328864 Anonymous B May 24, 2020, 7:37 p.m. OK Java 11 TESTS 3 171 0 800
81677850 yb1717 B May 28, 2020, 6:48 a.m. OK Java 11 TESTS 3 171 0 800
81366210 an1rudh B May 25, 2020, 9:13 a.m. OK Java 11 TESTS 3 171 0 800
81352085 rename_z B May 25, 2020, 6:07 a.m. OK Java 11 TESTS 3 171 0 800
81681902 aka_rsh B May 28, 2020, 7:42 a.m. OK Java 11 TESTS 3 186 0 800
81373012 Aabhas99 B May 25, 2020, 10:37 a.m. OK Java 8 TESTS 3 92 0 800
81458682 bluesky111 B May 26, 2020, 10:08 a.m. OK Java 8 TESTS 3 93 0 800
81450849 poindexter_21 B May 26, 2020, 8:23 a.m. OK Java 8 TESTS 3 93 0 800
81440780 Nirav412000 B May 26, 2020, 6:08 a.m. OK Java 8 TESTS 3 93 0 800
81331725 sanskriti0512 B May 24, 2020, 8:36 p.m. OK Java 8 TESTS 3 93 0 800
81613844 code_zy B May 27, 2020, 11:51 a.m. OK Java 8 TESTS 3 108 0 800
81384785 189301019.akshay B May 25, 2020, 12:57 p.m. OK Java 8 TESTS 3 108 0 800
81674385 yash49 B May 28, 2020, 6:05 a.m. OK Java 8 TESTS 3 108 0 800
81674369 labdhi B May 28, 2020, 6:05 a.m. OK Java 8 TESTS 3 108 0 800
81652305 3omar17 B May 27, 2020, 7:50 p.m. OK Java 8 TESTS 3 108 0 800
81394480 90qvB B May 25, 2020, 2:53 p.m. OK JavaScript TESTS 3 31 3891200 800
81377920 Fortin B May 25, 2020, 11:36 a.m. OK Kotlin TESTS 3 155 512000 800
81337369 Igorjan94 B May 25, 2020, 12:07 a.m. OK Kotlin TESTS 3 155 921600 800
81364087 Cyber.1 B May 25, 2020, 8:46 a.m. OK Kotlin TESTS 3 156 409600 800
81340355 S010M B May 25, 2020, 1:58 a.m. OK Kotlin TESTS 3 171 0 800
81402400 scnucjh B May 25, 2020, 4:29 p.m. OK Kotlin TESTS 3 171 1126400 800
81342079 golions B May 25, 2020, 2:46 a.m. OK Kotlin TESTS 3 171 1126400 800
81711805 ACACACACACACWACACACACAC B May 28, 2020, 1:56 p.m. OK Kotlin TESTS 3 186 0 800
81425315 Danzev B May 25, 2020, 11:23 p.m. OK Kotlin TESTS 3 186 0 800
81641280 Bloodwyn B May 27, 2020, 4:54 p.m. OK Kotlin TESTS 3 186 1126400 800
81350059 lazaroofarrill B May 25, 2020, 5:37 a.m. OK Kotlin TESTS 3 187 1126400 800
81417809 SirMemesALot B May 25, 2020, 7:39 p.m. OK Mono C# TESTS 3 61 2969600 800
81535118 SirMemesALot B May 26, 2020, 4:08 p.m. OK Mono C# TESTS 3 61 2969600 800
81617455 BowieD B May 27, 2020, 12:26 p.m. OK Mono C# TESTS 3 77 6758400 800
81475014 ellip B May 26, 2020, 1:30 p.m. OK Mono C# TESTS 3 77 6758400 800
81630893 mostafa_gamal_564 B May 27, 2020, 2:56 p.m. OK MS C++ TESTS 3 31 0 800
81365954 hrksarthak B May 25, 2020, 9:09 a.m. OK MS C++ TESTS 3 46 0 800
81376857 Aritra1242 B May 25, 2020, 11:24 a.m. OK MS C++ TESTS 3 46 0 800
81391717 ZA139 B May 25, 2020, 2:22 p.m. OK MS C++ 2017 TESTS 3 15 0 800
81459813 dimasidorenko B May 26, 2020, 10:24 a.m. OK MS C++ 2017 TESTS 3 31 0 800
81429745 leventa B May 26, 2020, 2:10 a.m. OK MS C++ 2017 TESTS 3 31 102400 800
81405736 Parigya B May 25, 2020, 5:14 p.m. OK MS C++ 2017 TESTS 3 31 204800 800
81592149 CrashMaster B May 27, 2020, 7:21 a.m. OK MS C++ 2017 TESTS 3 46 0 800
81665972 registuv B May 28, 2020, 3:16 a.m. OK MS C++ 2017 TESTS 3 46 0 800
81592677 Xstepik B May 27, 2020, 7:28 a.m. OK MS C++ 2017 TESTS 3 46 0 800
81570909 chen12321 B May 27, 2020, 12:52 a.m. OK MS C++ 2017 TESTS 3 46 0 800
81515685 Falca B May 26, 2020, 3:23 p.m. OK MS C++ 2017 TESTS 3 46 0 800
81435194 little_lion B May 26, 2020, 4:29 a.m. OK MS C++ 2017 TESTS 3 46 0 800
81417927 WbxOne B May 25, 2020, 7:42 p.m. OK Node.js TESTS 3 109 2662400 800
81417575 WbxOne B May 25, 2020, 7:35 p.m. OK Node.js TESTS 3 124 2150400 800
81417454 WbxOne B May 25, 2020, 7:33 p.m. OK Node.js TESTS 3 140 2252800 800
81603197 yumtam B May 27, 2020, 9:38 a.m. OK PyPy 2 TESTS 3 140 921600 800
81341581 ____ankit_sm____ B May 25, 2020, 2:34 a.m. OK PyPy 2 TESTS 3 171 1024000 800
81327645 beethoven97 B May 24, 2020, 7:16 p.m. OK PyPy 2 TESTS 3 186 2662400 800
81432481 ki0apa B May 26, 2020, 3:23 a.m. OK PyPy 2 TESTS 3 187 1740800 800
81338513 mir.panov B May 25, 2020, 12:49 a.m. OK PyPy 2 TESTS 3 187 2150400 800
81329505 tidu149 B May 24, 2020, 7:50 p.m. OK PyPy 3 TESTS 3 155 2150400 800
81387269 awasthishubh B May 25, 2020, 1:27 p.m. OK PyPy 3 TESTS 3 155 2764800 800
81386216 insider_pants B May 25, 2020, 1:14 p.m. OK PyPy 3 TESTS 3 170 2560000 800
81352874 dipta007 B May 25, 2020, 6:18 a.m. OK PyPy 3 TESTS 3 171 2764800 800
81470179 teexone B May 26, 2020, 12:32 p.m. OK PyPy 3 TESTS 3 186 3072000 800
81460305 shiv_99 B May 26, 2020, 10:32 a.m. OK PyPy 3 TESTS 3 187 2662400 800
81327659 diffeo B May 24, 2020, 7:16 p.m. OK PyPy 3 TESTS 3 187 2969600 800
81365794 ThetaSigma B May 25, 2020, 9:07 a.m. OK PyPy 3 TESTS 3 187 3072000 800
81552703 tflave B May 26, 2020, 5:57 p.m. OK PyPy 3 TESTS 3 187 3584000 800
81430579 Parag_AP B May 26, 2020, 2:36 a.m. OK PyPy 3 TESTS 3 202 2969600 800
81402348 mokshasood06 B May 25, 2020, 4:29 p.m. OK Python 2 TESTS 3 187 102400 800
81334119 shidi.zhao B May 24, 2020, 9:43 p.m. OK Python 2 TESTS 3 202 102400 800
81452543 brittzilla B May 26, 2020, 8:45 a.m. OK Python 3 TESTS 3 93 307200 800
81551650 AsseG133 B May 26, 2020, 5:50 p.m. OK Python 3 TESTS 3 108 0 800
81400665 4121170102NghiaVT B May 25, 2020, 4:07 p.m. OK Python 3 TESTS 3 108 0 800
81395246 MamtaSiyak B May 25, 2020, 3:02 p.m. OK Python 3 TESTS 3 108 0 800
81377891 vaishnavipalde B May 25, 2020, 11:36 a.m. OK Python 3 TESTS 3 108 0 800
81657030 ERRSSELL B May 27, 2020, 9:51 p.m. OK Python 3 TESTS 3 109 0 800
81467864 Prishu156 B May 26, 2020, 12:09 p.m. OK Python 3 TESTS 3 109 0 800
81453679 Sids0911 B May 26, 2020, 9 a.m. OK Python 3 TESTS 3 109 0 800
81421195 Amendark31 B May 25, 2020, 8:52 p.m. OK Python 3 TESTS 3 109 0 800
81401052 kk_98 B May 25, 2020, 4:12 p.m. OK Python 3 TESTS 3 109 0 800
81358565 utkarsh2102 B May 25, 2020, 7:34 a.m. OK Ruby TESTS 3 62 0 800
81668355 Rara. B May 28, 2020, 4:13 a.m. OK Ruby TESTS 3 108 0 800
81672080 altaway B May 28, 2020, 5:31 a.m. OK Rust TESTS 3 30 0 800
81672592 altaway B May 28, 2020, 5:40 a.m. OK Rust TESTS 3 31 0 800
81649773 altaway B May 27, 2020, 7:05 p.m. OK Rust TESTS 3 31 0 800
81646809 altaway B May 27, 2020, 6:15 p.m. OK Rust TESTS 3 31 0 800
81334667 TomazGomes B May 24, 2020, 10:02 p.m. OK Rust TESTS 3 31 0 800
81327195 one_feeble_coder B May 24, 2020, 7:09 p.m. OK Rust TESTS 3 31 102400 800
81381569 kobae964 B May 25, 2020, 12:19 p.m. OK Rust TESTS 3 31 716800 800
81434916 springroll B May 26, 2020, 4:21 a.m. OK Rust TESTS 3 61 0 800

remove filters

Back to search problems