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 |
---|---|---|---|---|---|---|
1615 | Codeforces Global Round 18 | FINISHED | False | 9000 | 96909863 | Dec. 24, 2021, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 20913 ) | A | Closing The Gap | PROGRAMMING | greedy math |
B"There are n block towers in a row, where tower i has a height of a_i . You're part of a building crew, and you want to make the buildings look as nice as possible. In a single day, you can perform the following operation: You think the ugliness of the buildings is the height difference between the tallest and shortest buildings. Formally, the ugliness is defined as max(a)- min(a) . What's the minimum possible ugliness you can achieve, after any number of days? The first line contains one integer t ( 1 <= q t <= q 1000 ) -- the number of test cases. Then t cases follow. The first line of each test case contains one integer n ( 2 <= q n <= q 100 ) -- the number of buildings. The second line of each test case contains n space separated integers a_1, a_2, ldots, a_n ( 1 <= q a_i <= q 10^7 ) -- the heights of the buildings. For each test case, output a single integer -- the minimum possible ugliness of the buildings. In the first test case, the ugliness is already 0 . In the second test case, you should do one operation, with i = 1 and j = 3 . The new heights will now be [2, 2, 2, 2] , with an ugliness of 0 . In the third test case, you may do three operations: "... |
Global Round 18 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
140524864 | gxlois | A | Dec. 24, 2021, 9:06 p.m. | OK | D | TESTS | 5 | 30 | 0 | ||
140490822 | jafor33 | A | Dec. 24, 2021, 4:10 p.m. | OK | GNU C11 | TESTS | 5 | 30 | 0 | ||
140517653 | MUMINUR_RASHID | A | Dec. 24, 2021, 7:04 p.m. | OK | GNU C11 | TESTS | 5 | 30 | 0 | ||
140525318 | the.esperanza.24 | A | Dec. 24, 2021, 9:18 p.m. | OK | GNU C11 | TESTS | 5 | 30 | 0 | ||
140494534 | Cheedella_Susmitha | A | Dec. 24, 2021, 4:22 p.m. | OK | GNU C11 | TESTS | 5 | 30 | 0 | ||
140500115 | Adarsh_1401 | A | Dec. 24, 2021, 4:43 p.m. | OK | GNU C11 | TESTS | 5 | 30 | 0 | ||
140500840 | T.Satwika | A | Dec. 24, 2021, 4:45 p.m. | OK | GNU C11 | TESTS | 5 | 30 | 0 | ||
140512637 | mihir_gohel | A | Dec. 24, 2021, 6:09 p.m. | OK | GNU C11 | TESTS | 5 | 30 | 0 | ||
140516439 | 4K11 | A | Dec. 24, 2021, 6:50 p.m. | OK | GNU C11 | TESTS | 5 | 30 | 0 | ||
140538168 | Hakir_Mubarmaj | A | Dec. 25, 2021, 4:29 a.m. | OK | GNU C11 | TESTS | 5 | 31 | 0 | ||
140543967 | vjudge1 | A | Dec. 25, 2021, 5:57 a.m. | OK | GNU C11 | TESTS | 5 | 31 | 0 | ||
140524030 | Shunya_ | A | Dec. 24, 2021, 8:47 p.m. | OK | GNU C++14 | TESTS | 5 | 15 | 0 | ||
140513468 | Zinnat_Ria | A | Dec. 24, 2021, 6:17 p.m. | OK | GNU C++14 | TESTS | 5 | 15 | 0 | ||
140507943 | PrafulSinghal | A | Dec. 24, 2021, 5:25 p.m. | OK | GNU C++14 | TESTS | 5 | 15 | 0 | ||
140533915 | 123ampagp | A | Dec. 25, 2021, 2:44 a.m. | OK | GNU C++14 | TESTS | 5 | 15 | 0 | ||
140533381 | AllFallsDown | A | Dec. 25, 2021, 2:28 a.m. | OK | GNU C++14 | TESTS | 5 | 15 | 0 | ||
140532838 | thesilione | A | Dec. 25, 2021, 2:13 a.m. | OK | GNU C++14 | TESTS | 5 | 15 | 0 | ||
140530739 | kh0i | A | Dec. 25, 2021, 1:07 a.m. | OK | GNU C++14 | TESTS | 5 | 15 | 0 | ||
140530021 | Land_ER | A | Dec. 25, 2021, 12:34 a.m. | OK | GNU C++14 | TESTS | 5 | 15 | 0 | ||
140529932 | duoluoluo | A | Dec. 25, 2021, 12:29 a.m. | OK | GNU C++14 | TESTS | 5 | 15 | 0 | ||
140524638 | Ayush_1234 | A | Dec. 24, 2021, 9 p.m. | OK | GNU C++14 | TESTS | 5 | 15 | 0 | ||
140507829 | incognito123 | A | Dec. 24, 2021, 5:25 p.m. | OK | GNU C++17 | TESTS | 5 | 15 | 0 | ||
140536308 | I_love_dp | A | Dec. 25, 2021, 3:48 a.m. | OK | GNU C++17 | TESTS | 5 | 15 | 0 | ||
140536348 | europium | A | Dec. 25, 2021, 3:49 a.m. | OK | GNU C++17 | TESTS | 5 | 15 | 0 | ||
140523578 | mahabub.rahman | A | Dec. 24, 2021, 8:36 p.m. | OK | GNU C++17 | TESTS | 5 | 15 | 0 | ||
140513644 | RafaelFdez | A | Dec. 24, 2021, 6:19 p.m. | OK | GNU C++17 | TESTS | 5 | 15 | 0 | ||
140512770 | damormadhu24 | A | Dec. 24, 2021, 6:10 p.m. | OK | GNU C++17 | TESTS | 5 | 15 | 0 | ||
140511643 | Atul_Ratnawat | A | Dec. 24, 2021, 5:58 p.m. | OK | GNU C++17 | TESTS | 5 | 15 | 0 | ||
140509898 | Sajjat004 | A | Dec. 24, 2021, 5:40 p.m. | OK | GNU C++17 | TESTS | 5 | 15 | 0 | ||
140508680 | shrii_06 | A | Dec. 24, 2021, 5:30 p.m. | OK | GNU C++17 | TESTS | 5 | 15 | 0 | ||
140508255 | Amadoo_ | A | Dec. 24, 2021, 5:27 p.m. | OK | GNU C++17 | TESTS | 5 | 15 | 0 | ||
140529204 | suvomoy_maitra | A | Dec. 24, 2021, 11:50 p.m. | OK | GNU C++17 (64) | TESTS | 5 | 15 | 0 | ||
140539525 | MoNir_ | A | Dec. 25, 2021, 4:53 a.m. | OK | GNU C++17 (64) | TESTS | 5 | 15 | 0 | ||
140533959 | 93wilsonlu | A | Dec. 25, 2021, 2:45 a.m. | OK | GNU C++17 (64) | TESTS | 5 | 15 | 0 | ||
140533535 | LoveYouEx | A | Dec. 25, 2021, 2:32 a.m. | OK | GNU C++17 (64) | TESTS | 5 | 15 | 0 | ||
140532777 | Arteml | A | Dec. 25, 2021, 2:11 a.m. | OK | GNU C++17 (64) | TESTS | 5 | 15 | 0 | ||
140528988 | _tushar_19 | A | Dec. 24, 2021, 11:39 p.m. | OK | GNU C++17 (64) | TESTS | 5 | 15 | 0 | ||
140527567 | Evang | A | Dec. 24, 2021, 10:32 p.m. | OK | GNU C++17 (64) | TESTS | 5 | 15 | 0 | ||
140514622 | fuad161 | A | Dec. 24, 2021, 6:29 p.m. | OK | GNU C++17 (64) | TESTS | 5 | 15 | 0 | ||
140513958 | nishant403 | A | Dec. 24, 2021, 6:22 p.m. | OK | GNU C++17 (64) | TESTS | 5 | 15 | 0 | ||
140513691 | tejpratapp468 | A | Dec. 24, 2021, 6:19 p.m. | OK | GNU C++17 (64) | TESTS | 5 | 15 | 0 | ||
140528569 | defilt | A | Dec. 24, 2021, 11:17 p.m. | OK | GNU C++20 (64) | TESTS | 5 | 0 | 0 | ||
140515191 | abhinavsingh0520 | A | Dec. 24, 2021, 6:35 p.m. | OK | GNU C++20 (64) | TESTS | 5 | 0 | 102400 | ||
140507907 | coder_Gajendra | A | Dec. 24, 2021, 5:25 p.m. | OK | GNU C++20 (64) | TESTS | 5 | 0 | 21708800 | ||
140539585 | Ltta113 | A | Dec. 25, 2021, 4:54 a.m. | OK | GNU C++20 (64) | TESTS | 5 | 15 | 0 | ||
140541040 | Curd | A | Dec. 25, 2021, 5:18 a.m. | OK | GNU C++20 (64) | TESTS | 5 | 15 | 0 | ||
140542683 | Enigma_52 | A | Dec. 25, 2021, 5:40 a.m. | OK | GNU C++20 (64) | TESTS | 5 | 15 | 0 | ||
140543057 | Ayushi_04 | A | Dec. 25, 2021, 5:45 a.m. | OK | GNU C++20 (64) | TESTS | 5 | 15 | 0 | ||
140535002 | edith_tech | A | Dec. 25, 2021, 3:14 a.m. | OK | GNU C++20 (64) | TESTS | 5 | 15 | 0 | ||
140537940 | incogn1to | A | Dec. 25, 2021, 4:25 a.m. | OK | GNU C++20 (64) | TESTS | 5 | 15 | 0 | ||
140538123 | rio100466 | A | Dec. 25, 2021, 4:29 a.m. | OK | GNU C++20 (64) | TESTS | 5 | 15 | 0 | ||
140507951 | Dmohan | A | Dec. 24, 2021, 5:25 p.m. | OK | Go | TESTS | 5 | 62 | 819200 | ||
140526860 | pili | A | Dec. 24, 2021, 10:04 p.m. | OK | Java 11 | TESTS | 5 | 155 | 0 | ||
140516196 | Satyaa | A | Dec. 24, 2021, 6:46 p.m. | OK | Java 11 | TESTS | 5 | 171 | 0 | ||
140535724 | __Serendipity | A | Dec. 25, 2021, 3:34 a.m. | OK | Java 11 | TESTS | 5 | 171 | 0 | ||
140512782 | WalrusRamen21 | A | Dec. 24, 2021, 6:10 p.m. | OK | Java 11 | TESTS | 5 | 171 | 0 | ||
140497275 | moto_18 | A | Dec. 24, 2021, 4:32 p.m. | OK | Java 11 | TESTS | 5 | 186 | 0 | ||
140541869 | gawsfbet | A | Dec. 25, 2021, 5:29 a.m. | OK | Java 11 | TESTS | 5 | 186 | 0 | ||
140510594 | Amir_Coderest | A | Dec. 24, 2021, 5:47 p.m. | OK | Java 11 | TESTS | 5 | 187 | 0 | ||
140540501 | flyroko | A | Dec. 25, 2021, 5:09 a.m. | OK | Java 11 | TESTS | 5 | 202 | 0 | ||
140536492 | vinayak3010 | A | Dec. 25, 2021, 3:52 a.m. | OK | Java 11 | TESTS | 5 | 202 | 0 | ||
140523186 | LongWalk | A | Dec. 24, 2021, 8:29 p.m. | OK | Java 11 | TESTS | 5 | 202 | 0 | ||
140544159 | solo07 | A | Dec. 25, 2021, 5:59 a.m. | OK | Java 8 | TESTS | 5 | 92 | 0 | ||
140536514 | gagan_6730 | A | Dec. 25, 2021, 3:53 a.m. | OK | Java 8 | TESTS | 5 | 124 | 0 | ||
140543961 | H4wkylE | A | Dec. 25, 2021, 5:57 a.m. | OK | Java 8 | TESTS | 5 | 124 | 0 | ||
140510258 | RONIN786 | A | Dec. 24, 2021, 5:43 p.m. | OK | Java 8 | TESTS | 5 | 124 | 0 | ||
140500510 | haridevelops | A | Dec. 24, 2021, 4:44 p.m. | OK | Java 8 | TESTS | 5 | 171 | 0 | ||
140528156 | ivanioc | A | Dec. 24, 2021, 10:56 p.m. | OK | Java 8 | TESTS | 5 | 233 | 0 | ||
140519644 | harsh08 | A | Dec. 24, 2021, 7:30 p.m. | OK | Java 8 | TESTS | 5 | 249 | 0 | ||
140543227 | Pranay2516 | A | Dec. 25, 2021, 5:47 a.m. | OK | Java 8 | TESTS | 5 | 249 | 0 | ||
140535574 | nidhisheel | A | Dec. 25, 2021, 3:30 a.m. | OK | Java 8 | TESTS | 5 | 249 | 0 | ||
140492550 | 190031529 | A | Dec. 24, 2021, 4:16 p.m. | OK | Java 8 | TESTS | 5 | 249 | 0 | ||
140517245 | Aayush1501 | A | Dec. 24, 2021, 6:59 p.m. | OK | MS C++ 2017 | TESTS | 5 | 62 | 0 | ||
140501522 | Owen_Perez | A | Dec. 24, 2021, 4:48 p.m. | OK | MS C++ 2017 | TESTS | 5 | 78 | 0 | ||
140537901 | zilioner | A | Dec. 25, 2021, 4:24 a.m. | OK | MS C++ 2017 | TESTS | 5 | 93 | 0 | ||
140539533 | devanand001 | A | Dec. 25, 2021, 4:54 a.m. | OK | MS C++ 2017 | TESTS | 5 | 93 | 0 | ||
140517779 | justinyee888 | A | Dec. 24, 2021, 7:05 p.m. | OK | MS C++ 2017 | TESTS | 5 | 93 | 0 | ||
140501141 | suraj__ | A | Dec. 24, 2021, 4:46 p.m. | OK | .NET Core C# | TESTS | 5 | 92 | 3276800 | ||
140507885 | 1_2_3_4_5_9 | A | Dec. 24, 2021, 5:25 p.m. | OK | PyPy 2 | TESTS | 5 | 140 | 3686400 | ||
140533840 | Liberator187 | A | Dec. 25, 2021, 2:41 a.m. | OK | PyPy 3 | TESTS | 5 | 155 | 4198400 | ||
140536019 | ambs_ | A | Dec. 25, 2021, 3:41 a.m. | OK | PyPy 3 | TESTS | 5 | 155 | 4300800 | ||
140523854 | piSquared | A | Dec. 24, 2021, 8:42 p.m. | OK | PyPy 3 | TESTS | 5 | 171 | 3891200 | ||
140543507 | lallala | A | Dec. 25, 2021, 5:51 a.m. | OK | PyPy 3 | TESTS | 5 | 171 | 4198400 | ||
140491432 | KeiTsukishima | A | Dec. 24, 2021, 4:12 p.m. | OK | PyPy 3 | TESTS | 5 | 171 | 7372800 | ||
140509786 | harshitgarg02 | A | Dec. 24, 2021, 5:39 p.m. | OK | PyPy 3 | TESTS | 5 | 186 | 4710400 | ||
140500728 | areeshasayed09 | A | Dec. 24, 2021, 4:45 p.m. | OK | PyPy 3 | TESTS | 5 | 202 | 5427200 | ||
140508575 | armsusman | A | Dec. 24, 2021, 5:30 p.m. | OK | PyPy 3 | TESTS | 5 | 202 | 10547200 | ||
140541621 | __Nobel__3 | A | Dec. 25, 2021, 5:26 a.m. | OK | PyPy 3 | TESTS | 5 | 217 | 6451200 | ||
140518019 | Yigael | A | Dec. 24, 2021, 7:08 p.m. | OK | PyPy 3 | TESTS | 5 | 217 | 6553600 | ||
140508816 | IkshitG | A | Dec. 24, 2021, 5:31 p.m. | OK | PyPy 3-64 | TESTS | 5 | 109 | 1638400 | ||
140507875 | aman_xoxo | A | Dec. 24, 2021, 5:25 p.m. | OK | PyPy 3-64 | TESTS | 5 | 140 | 2969600 | ||
140541441 | p_r_a_n_a_v | A | Dec. 25, 2021, 5:23 a.m. | OK | PyPy 3-64 | TESTS | 5 | 140 | 9420800 | ||
140544069 | FemmeAndroid | A | Dec. 25, 2021, 5:58 a.m. | OK | PyPy 3-64 | TESTS | 5 | 155 | 2969600 | ||
140511743 | rivnam | A | Dec. 24, 2021, 5:59 p.m. | OK | PyPy 3-64 | TESTS | 5 | 186 | 3788800 | ||
140530020 | Multibala | A | Dec. 25, 2021, 12:34 a.m. | OK | PyPy 3-64 | TESTS | 5 | 187 | 4812800 | ||
140495948 | KeshNar | A | Dec. 24, 2021, 4:27 p.m. | OK | PyPy 3-64 | TESTS | 5 | 202 | 9113600 | ||
140531933 | -duk- | A | Dec. 25, 2021, 1:46 a.m. | OK | PyPy 3-64 | TESTS | 5 | 217 | 8806400 | ||
140542756 | Steelmail | A | Dec. 25, 2021, 5:41 a.m. | OK | PyPy 3-64 | TESTS | 5 | 218 | 9113600 | ||
140513511 | BlueDiamond | A | Dec. 24, 2021, 6:17 p.m. | OK | PyPy 3-64 | TESTS | 5 | 218 | 9113600 | ||
140539262 | the_emerging_coder | A | Dec. 25, 2021, 4:49 a.m. | OK | Python 3 | TESTS | 5 | 46 | 0 | ||
140492300 | airksh | A | Dec. 24, 2021, 4:15 p.m. | OK | Python 3 | TESTS | 5 | 61 | 0 | ||
140513181 | Kashem_1234567 | A | Dec. 24, 2021, 6:14 p.m. | OK | Python 3 | TESTS | 5 | 62 | 0 | ||
140512041 | ITS_TIME_TO_CHANGE | A | Dec. 24, 2021, 6:02 p.m. | OK | Python 3 | TESTS | 5 | 62 | 0 | ||
140502397 | coderbd | A | Dec. 24, 2021, 4:51 p.m. | OK | Python 3 | TESTS | 5 | 62 | 0 | ||
140499091 | midouni | A | Dec. 24, 2021, 4:39 p.m. | OK | Python 3 | TESTS | 5 | 62 | 0 | ||
140544023 | anil00779 | A | Dec. 25, 2021, 5:58 a.m. | OK | Python 3 | TESTS | 5 | 62 | 204800 | ||
140538053 | bkifhr10 | A | Dec. 25, 2021, 4:27 a.m. | OK | Python 3 | TESTS | 5 | 62 | 204800 | ||
140526800 | Fasih101 | A | Dec. 24, 2021, 10:02 p.m. | OK | Python 3 | TESTS | 5 | 62 | 204800 | ||
140520898 | sedenion | A | Dec. 24, 2021, 7:48 p.m. | OK | Python 3 | TESTS | 5 | 62 | 204800 | ||
140515745 | p00f | A | Dec. 24, 2021, 6:41 p.m. | OK | Rust 2021 | TESTS | 5 | 0 | 0 | ||
140519046 | kumalimak | A | Dec. 24, 2021, 7:21 p.m. | OK | Rust 2021 | TESTS | 5 | 15 | 102400 |
Back to search problems