Technocup 2022 - Elimination Round 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
1585 Technocup 2022 - Elimination Round 3 FINISHED False 7200 97944263 Dec. 12, 2021, 3:15 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 12227 ) C Minimize Distance PROGRAMMING greedy

B'A total of n depots are located on a number line. Depot i lies at the point x_i for 1 <= i <= n . You are a salesman with n bags of goods, attempting to deliver one bag to each of the n depots. You and the n bags are initially at the origin 0 . You can carry up to k bags at a time. You must collect the required number of goods from the origin, deliver them to the respective depots, and then return to the origin to collect your next batch of goods. Calculate the minimum distance you need to cover to deliver all the bags of goods to the depots. You do not have to return to the origin after you have delivered all the bags. Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 10 ,500 ). Description of the test cases follows. The first line of each test case contains two integers n and k ( 1 <= k <= n <= 2 cdot 10^5 ). The second line of each test case contains n integers x_1, x_2, ldots, x_n ( -10^9 <= x_i <= 10^9 ). It is possible that some depots share the same position. It is guaranteed that the sum of n over all test cases does not exceed 2 cdot 10^5 . For each test case, output a single integer denoting the minimum distance you need to cover to deliver all the bags of goods to the depots. In the first test case, you can carry only one bag at a time. Thus, the following is a solution sequence that gives a minimum travel distance: 0 to 2 to 0 to 4 to 0 to 3 to 0 to 1 to 0 to 5 , where each 0 means you go the origin and grab one bag, and each positive integer means you deliver the bag to a depot at this coordinate, giving a total distance of 25 units. It must be noted that there are other sequences that give the same distance. In the second test case, you can follow the following sequence, among multiple such sequences, to travel minimum distance: 0 to 6 to 8 to'...

Tutorials

Codeforces Round #759 (Div. 2, based on Technocup 2022 Elimination Round 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
138998575 Captnikh C Dec. 13, 2021, 3:15 p.m. OK GNU C++14 TESTS 11 62 819200
138975445 Fanarill C Dec. 13, 2021, 11:14 a.m. OK GNU C++14 TESTS 11 62 1638400
138895791 eiva C Dec. 12, 2021, 3:58 p.m. OK GNU C++14 TESTS 11 62 1638400
139030482 parthesh10 C Dec. 13, 2021, 11:17 p.m. OK GNU C++14 TESTS 11 62 2969600
139056878 smile_joke C Dec. 14, 2021, 5:37 a.m. OK GNU C++14 TESTS 11 77 1638400
138898019 ArTeM_L C Dec. 12, 2021, 4:03 p.m. OK GNU C++14 TESTS 11 77 1638400
139032910 adrianmuro02 C Dec. 14, 2021, 1:03 a.m. OK GNU C++14 TESTS 11 77 2969600
138899657 c0ldzy C Dec. 12, 2021, 4:08 p.m. OK GNU C++14 TESTS 11 77 2969600
138895149 Shigeq C Dec. 12, 2021, 3:56 p.m. OK GNU C++14 TESTS 11 77 2969600
138899030 Max_Calincu C Dec. 12, 2021, 4:06 p.m. OK GNU C++14 TESTS 11 77 3174400
138909947 dara_tovstyga C Dec. 12, 2021, 4:34 p.m. OK GNU C++17 TESTS 11 61 1433600
138972383 Choize C Dec. 13, 2021, 10:36 a.m. OK GNU C++17 TESTS 11 61 3481600
139040032 GennadyTran C Dec. 14, 2021, 4:54 a.m. OK GNU C++17 TESTS 11 62 1433600
138913726 okultist C Dec. 12, 2021, 4:47 p.m. OK GNU C++17 TESTS 11 62 1433600
138912191 Gorulko_Sofia C Dec. 12, 2021, 4:42 p.m. OK GNU C++17 TESTS 11 62 1433600
138918892 ZFreeX C Dec. 12, 2021, 5:04 p.m. OK GNU C++17 TESTS 11 62 1638400
138986854 TomAndJerryFan C Dec. 13, 2021, 1:12 p.m. OK GNU C++17 TESTS 11 62 2252800
138915066 corol C Dec. 12, 2021, 4:51 p.m. OK GNU C++17 TESTS 11 62 2252800
138920974 SlideDrugs C Dec. 12, 2021, 5:10 p.m. OK GNU C++17 TESTS 11 62 2969600
138918063 gurovv C Dec. 12, 2021, 5:01 p.m. OK GNU C++17 TESTS 11 62 2969600
138919078 salakhutdinov1 C Dec. 12, 2021, 5:05 p.m. OK GNU C++17 (64) TESTS 11 46 1433600
138909876 Thesircastor C Dec. 12, 2021, 4:34 p.m. OK GNU C++17 (64) TESTS 11 46 1433600
138908227 d_nelepova C Dec. 12, 2021, 4:29 p.m. OK GNU C++17 (64) TESTS 11 46 3174400
138903925 spartanes C Dec. 12, 2021, 4:19 p.m. OK GNU C++17 (64) TESTS 11 46 3584000
138896940 wift C Dec. 12, 2021, 4:01 p.m. OK GNU C++17 (64) TESTS 11 46 5222400
138897640 MDastan C Dec. 12, 2021, 4:02 p.m. OK GNU C++17 (64) TESTS 11 61 1638400
138918008 budushiyprogrammist C Dec. 12, 2021, 5:01 p.m. OK GNU C++17 (64) TESTS 11 61 1843200
139041148 prithvijitbasak C Dec. 14, 2021, 5:16 a.m. OK GNU C++17 (64) TESTS 11 61 3174400
138919756 Arlan4ik C Dec. 12, 2021, 5:07 p.m. OK GNU C++17 (64) TESTS 11 61 3584000
138911462 kx_ilya C Dec. 12, 2021, 4:39 p.m. OK GNU C++17 (64) TESTS 11 61 3584000
138889405 pakman C Dec. 12, 2021, 3:44 p.m. OK GNU C++20 (64) TESTS 11 31 3993600
138913827 oaoammm C Dec. 12, 2021, 4:47 p.m. OK GNU C++20 (64) TESTS 11 46 1638400
138913573 XALWA C Dec. 12, 2021, 4:46 p.m. OK GNU C++20 (64) TESTS 11 46 1638400
138911786 Mortelman C Dec. 12, 2021, 4:40 p.m. OK GNU C++20 (64) TESTS 11 46 1638400
138900006 MrEssiorx C Dec. 12, 2021, 4:08 p.m. OK GNU C++20 (64) TESTS 11 46 1638400
138888906 JustNik77 C Dec. 12, 2021, 3:43 p.m. OK GNU C++20 (64) TESTS 11 46 1638400
138897178 EscKaram C Dec. 12, 2021, 4:01 p.m. OK GNU C++20 (64) TESTS 11 46 1843200
138889297 cheeskek C Dec. 12, 2021, 3:43 p.m. OK GNU C++20 (64) TESTS 11 46 1843200
138886943 Ameba2.0 C Dec. 12, 2021, 3:39 p.m. OK GNU C++20 (64) TESTS 11 46 1843200
138889914 lev1106 C Dec. 12, 2021, 3:45 p.m. OK GNU C++20 (64) TESTS 11 46 3174400
138904807 KhamGao_O C Dec. 12, 2021, 4:22 p.m. OK Java 8 TESTS 11 264 14540800
139039322 muhammad_mehedi_hasan C Dec. 14, 2021, 4:38 a.m. OK Java 8 TESTS 11 452 0
138900771 AndrOgurc C Dec. 12, 2021, 4:11 p.m. OK Kotlin 1.5 TESTS 11 498 19251200
139032967 Shuai. C Dec. 14, 2021, 1:05 a.m. OK MS C++ 2017 TESTS 11 78 2355200
138903644 alever C Dec. 12, 2021, 4:18 p.m. OK MS C++ 2017 TESTS 11 202 1638400
138921722 Liter3 C Dec. 12, 2021, 5:12 p.m. OK MS C++ 2017 TESTS 11 218 1843200
138900337 n.a.orlov C Dec. 12, 2021, 4:09 p.m. OK MS C++ 2017 TESTS 11 218 4300800
138884791 SerZak C Dec. 12, 2021, 3:35 p.m. OK MS C++ 2017 TESTS 11 233 1638400
138903293 pospeloval123 C Dec. 12, 2021, 4:17 p.m. OK MS C++ 2017 TESTS 11 233 4300800
138922066 alexyurkin101 C Dec. 12, 2021, 5:13 p.m. OK MS C++ 2017 TESTS 11 249 3174400
138918124 Qwerty624 C Dec. 12, 2021, 5:01 p.m. OK MS C++ 2017 TESTS 11 249 5120000
138910456 Dmitry.bulgakov C Dec. 12, 2021, 4:36 p.m. OK MS C++ 2017 TESTS 11 280 6860800
138982513 MILOY C Dec. 13, 2021, 12:26 p.m. OK PyPy 3 TESTS 11 343 22425600
138905912 bulbunyuk C Dec. 12, 2021, 4:25 p.m. OK PyPy 3 TESTS 11 373 18329600
138917901 renatxat C Dec. 12, 2021, 5:01 p.m. OK PyPy 3 TESTS 11 529 18739200
139009642 Hydro_genium C Dec. 13, 2021, 5:12 p.m. OK PyPy 3 TESTS 11 530 19046400
138979399 Sokol080808 C Dec. 13, 2021, 11:56 a.m. OK PyPy 3 TESTS 11 545 18022400
138905730 billexey C Dec. 12, 2021, 4:25 p.m. OK PyPy 3 TESTS 11 545 19046400
138913619 KorolevEY C Dec. 12, 2021, 4:46 p.m. OK PyPy 3 TESTS 11 545 19353600
138902731 MashaM C Dec. 12, 2021, 4:16 p.m. OK PyPy 3 TESTS 11 561 19046400
138892843 _Octal_ C Dec. 12, 2021, 3:51 p.m. OK PyPy 3 TESTS 11 561 19046400
138918185 kukolnikov C Dec. 12, 2021, 5:02 p.m. OK PyPy 3 TESTS 11 576 19046400
138915319 selmik C Dec. 12, 2021, 4:52 p.m. OK PyPy 3-64 TESTS 11 468 20070400
138913036 Avalet C Dec. 12, 2021, 4:44 p.m. OK PyPy 3-64 TESTS 11 529 15257600
138907675 Dkoplik C Dec. 12, 2021, 4:27 p.m. OK PyPy 3-64 TESTS 11 545 15667200
138919079 Artur010 C Dec. 12, 2021, 5:05 p.m. OK PyPy 3-64 TESTS 11 545 19865600
138910708 didee C Dec. 12, 2021, 4:37 p.m. OK PyPy 3-64 TESTS 11 546 13721600
138902380 Bloodmain C Dec. 12, 2021, 4:15 p.m. OK PyPy 3-64 TESTS 11 561 19456000
138916523 Kat.vus C Dec. 12, 2021, 4:56 p.m. OK PyPy 3-64 TESTS 11 592 19865600
138911371 Vlad_cool C Dec. 12, 2021, 4:39 p.m. OK PyPy 3-64 TESTS 11 608 19865600
138921979 yistarostin C Dec. 12, 2021, 5:13 p.m. OK PyPy 3-64 TESTS 11 624 16998400
138920432 Alena_Lebedenko C Dec. 12, 2021, 5:09 p.m. OK PyPy 3-64 TESTS 11 638 19865600
138907421 Rey838 C Dec. 12, 2021, 4:26 p.m. OK Python 3 TESTS 11 202 16179200
138911553 ilyarybin C Dec. 12, 2021, 4:39 p.m. OK Python 3 TESTS 11 233 16179200
138913517 ik89151379915 C Dec. 12, 2021, 4:46 p.m. OK Python 3 TESTS 11 249 16179200
138908744 Shaman402 C Dec. 12, 2021, 4:30 p.m. OK Python 3 TESTS 11 264 14540800
138903777 klkvr C Dec. 12, 2021, 4:19 p.m. OK Python 3 TESTS 11 264 16179200
138893971 IvanMarukhlenko C Dec. 12, 2021, 3:53 p.m. OK Python 3 TESTS 11 264 16179200
138913911 Artik_2005 C Dec. 12, 2021, 4:47 p.m. OK Python 3 TESTS 11 264 16486400
138897678 123zettachanel123 C Dec. 12, 2021, 4:03 p.m. OK Python 3 TESTS 11 265 15052800
138899384 IzhetskiyVitalik C Dec. 12, 2021, 4:07 p.m. OK Python 3 TESTS 11 280 16179200
138900089 fu_proger C Dec. 12, 2021, 4:09 p.m. OK Python 3 TESTS 11 295 15052800

remove filters

Back to search problems