Codeforces Round 539 (Div. 2)

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
1113 Codeforces Round 539 (Div. 2) FINISHED False 9000 187104287 Feb. 16, 2019, 4:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 7782 ) B Sasha and Magnetic Machines PROGRAMMING greedy number theory 1300

B"One day Sasha visited the farmer 2D and his famous magnetic farm. On this farm, the crop grows due to the influence of a special magnetic field. Maintaining of the magnetic field is provided by n machines, and the power of the i -th machine is a_i . This year 2D decided to cultivate a new culture, but what exactly he didn't say. For the successful growth of the new culture, it is necessary to slightly change the powers of the machines. 2D can at most once choose an arbitrary integer x , then choose one machine and reduce the power of its machine by x times, and at the same time increase the power of one another machine by x times (powers of all the machines must stay positive integers). Note that he may not do that if he wants. More formally, 2D can choose two such indices i and j , and one integer x such that x is a divisor of a_i , and change powers as following: a_i = frac{a_i}{x} , a_j = a_j cdot x Sasha is very curious, that's why he wants to calculate the minimum total power the farmer can reach. There are too many machines, and Sasha can't cope with computations, help him! The first line contains one integer n ( 2 <= n <= 5 cdot 10^4 ) -- the number of machines. The second line contains n integers a_1, a_2, ldots, a_n ( 1 <= a_i <= 100 ) -- the powers of the machines. Print one integer -- minimum total power. In the first example, the farmer can reduce the power of the 4 -th machine by 2 times, and increase the power of the 1 -st machine by 2 times, then the powers will be: [2, 2, 3, 2, 5] . In the second example, the farmer can reduce the power of the 3 -rd machine by 2 times, and increase the power of the 2 -nd machine by 2 times. At the same time, the farmer can leave is be as it is and the total power won't change. In the third example, it is optimal to leave it be as it is. "...

Tutorials

Codeforces Round #539 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
50009929 rr_ B Feb. 16, 2019, 5:05 p.m. OK D TESTS 31 46 4198400 1300
50007527 ruban B Feb. 16, 2019, 4:58 p.m. OK Delphi TESTS 31 31 27852800 1300
50029173 PAG B Feb. 16, 2019, 6:37 p.m. OK FPC TESTS 31 31 307200 1300
50008702 PhuongPeu B Feb. 16, 2019, 5:02 p.m. OK FPC TESTS 31 31 512000 1300
56303446 LaSWeeG B June 30, 2019, 10:18 a.m. OK FPC TESTS 31 31 819200 1300
58681010 romanporsh B Aug. 12, 2019, 6:57 p.m. OK FPC TESTS 31 46 204800 1300
50006813 Yarodassh B Feb. 16, 2019, 4:56 p.m. OK FPC TESTS 31 46 204800 1300
51882172 pqhieu B March 27, 2019, 2:40 a.m. OK FPC TESTS 31 46 307200 1300
50010466 ayatsevich B Feb. 16, 2019, 5:07 p.m. OK FPC TESTS 31 46 307200 1300
50019427 stanislav1 B Feb. 16, 2019, 5:42 p.m. OK FPC TESTS 31 46 409600 1300
51325361 chaorenhaha B March 15, 2019, 9:25 a.m. OK FPC TESTS 31 46 512000 1300
51937238 NoSoul B March 28, 2019, 12:58 p.m. OK GNU C11 TESTS 31 31 0 1300
50009587 alexismed B Feb. 16, 2019, 5:04 p.m. OK GNU C11 TESTS 31 31 0 1300
50312654 sansen B Feb. 22, 2019, 10:37 a.m. OK GNU C11 TESTS 31 31 0 1300
50354253 vanda B Feb. 23, 2019, 10:02 a.m. OK GNU C11 TESTS 31 31 0 1300
50508007 rainboy B Feb. 25, 2019, 9:05 p.m. OK GNU C11 TESTS 31 31 0 1300
51158991 2018030401093 B March 11, 2019, 11:29 a.m. OK GNU C11 TESTS 31 31 0 1300
51159032 vjudge4 B March 11, 2019, 11:30 a.m. OK GNU C11 TESTS 31 31 0 1300
56515107 rudro1152 B July 4, 2019, 12:20 p.m. OK GNU C11 TESTS 31 31 204800 1300
53284816 vjudge2 B April 25, 2019, 1:30 p.m. OK GNU C11 TESTS 31 31 204800 1300
59586127 kaiboy B Aug. 27, 2019, 6:04 p.m. OK GNU C11 TESTS 31 31 204800 1300
52011546 luogu_bot1 B March 30, 2019, 8:48 a.m. OK GNU C++11 TESTS 31 30 204800 1300
52011507 luogu_bot2 B March 30, 2019, 8:48 a.m. OK GNU C++11 TESTS 31 30 204800 1300
50040461 JerrySun steven7 B Feb. 17, 2019, 1:19 a.m. OK GNU C++11 TESTS 31 30 819200 1300
59204055 1716050307 B Aug. 21, 2019, 6:13 a.m. OK GNU C++11 TESTS 31 31 0 1300
51285647 WhYnOtmE_ljq B March 14, 2019, 7:04 a.m. OK GNU C++11 TESTS 31 31 0 1300
51123712 Luvwgyx B March 10, 2019, 10:36 a.m. OK GNU C++11 TESTS 31 31 0 1300
69075787 bagpipe B Jan. 19, 2020, 2:59 a.m. OK GNU C++11 TESTS 31 31 0 1300
62684633 vjudge5 B Oct. 16, 2019, 1:45 p.m. OK GNU C++11 TESTS 31 31 0 1300
62345953 luogu_bot5 B Oct. 11, 2019, 7:29 a.m. OK GNU C++11 TESTS 31 31 0 1300
53602808 Nipunbaishnab B May 1, 2019, 8:41 a.m. OK GNU C++11 TESTS 31 31 0 1300
50042227 nhho B Feb. 17, 2019, 2:59 a.m. OK GNU C++14 TESTS 31 15 0 1300
50055041 porag_ict_mbstu B Feb. 17, 2019, 9:51 a.m. OK GNU C++14 TESTS 31 30 0 1300
50047776 goku192 B Feb. 17, 2019, 6:50 a.m. OK GNU C++14 TESTS 31 30 0 1300
50030459 1969shubhamsharma23 B Feb. 16, 2019, 6:45 p.m. OK GNU C++14 TESTS 31 30 204800 1300
50054838 Capricornmean B Feb. 17, 2019, 9:46 a.m. OK GNU C++14 TESTS 31 30 204800 1300
51923998 Lavis B March 28, 2019, 6:27 a.m. OK GNU C++14 TESTS 31 30 204800 1300
50054918 Mr_Emrul B Feb. 17, 2019, 9:48 a.m. OK GNU C++14 TESTS 31 30 7987200 1300
54992565 algo_overdose B June 2, 2019, 7:56 p.m. OK GNU C++14 TESTS 31 31 0 1300
68156547 msr B Jan. 4, 2020, 9:09 a.m. OK GNU C++14 TESTS 31 31 0 1300
61016820 brenner1 B Sept. 21, 2019, 1:34 p.m. OK GNU C++14 TESTS 31 31 0 1300
50479467 7989 B Feb. 25, 2019, 8:07 a.m. OK GNU C++17 TESTS 31 15 0 1300
50144176 SDNU_LuoXinC B Feb. 19, 2019, 2:08 a.m. OK GNU C++17 TESTS 31 30 0 1300
52257546 yuxizi B April 3, 2019, 6:47 a.m. OK GNU C++17 TESTS 31 30 0 1300
50590389 648771054 B Feb. 28, 2019, 7:04 a.m. OK GNU C++17 TESTS 31 30 204800 1300
50700494 .tx B March 2, 2019, 8:58 p.m. OK GNU C++17 TESTS 31 30 204800 1300
53491306 nwpugeh B April 29, 2019, 8:51 a.m. OK GNU C++17 TESTS 31 30 204800 1300
51098682 kaizen19 B March 9, 2019, 5:55 p.m. OK GNU C++17 TESTS 31 30 409600 1300
50061304 wzy1999 B Feb. 17, 2019, 12:46 p.m. OK GNU C++17 TESTS 31 30 3993600 1300
66229642 ORZZZQTXDY B Dec. 3, 2019, 1:54 p.m. OK GNU C++17 TESTS 31 31 0 1300
69592604 UniverseofHK B Jan. 27, 2020, 1:45 a.m. OK GNU C++17 TESTS 31 31 0 1300
50018662 life_is_not_bed_of_roses B Feb. 16, 2019, 5:38 p.m. OK Go TESTS 31 61 0 1300
50027152 ricklee666666 B Feb. 16, 2019, 6:23 p.m. OK Go TESTS 31 639 0 1300
50012281 gksato B Feb. 16, 2019, 5:13 p.m. OK Haskell TESTS 31 46 102400 1300
50651373 Hillmouse B March 1, 2019, 5:45 p.m. OK Haskell TESTS 31 109 1126400 1300
57913678 jmazon B July 28, 2019, 10:46 p.m. OK Haskell TESTS 31 249 6348800 1300
50058945 manish_98 B Feb. 17, 2019, 11:45 a.m. OK Java 8 TESTS 31 109 0 1300
59594580 ijxjdjd B Aug. 28, 2019, 12:11 a.m. OK Java 8 TESTS 31 124 0 1300
58167837 garnacha B Aug. 2, 2019, 9:51 a.m. OK Java 8 TESTS 31 124 0 1300
55433143 Dejokz B June 11, 2019, 12:30 p.m. OK Java 8 TESTS 31 124 0 1300
55229823 amolpratap007 B June 7, 2019, 4:50 a.m. OK Java 8 TESTS 31 124 0 1300
55113561 cribabby B June 5, 2019, 7:35 a.m. OK Java 8 TESTS 31 124 0 1300
51401173 Pratik_Rajani B March 17, 2019, 7:26 a.m. OK Java 8 TESTS 31 124 0 1300
51246213 mdazmat9 B March 13, 2019, 5:26 a.m. OK Java 8 TESTS 31 124 0 1300
50865586 PugachAG B March 5, 2019, 8:12 p.m. OK Java 8 TESTS 31 124 0 1300
50508051 Dukkha B Feb. 25, 2019, 9:07 p.m. OK Java 8 TESTS 31 124 0 1300
50030536 yoga1290 B Feb. 16, 2019, 6:46 p.m. OK JavaScript TESTS 31 78 6246400 1300
51608010 exs B March 21, 2019, 8:38 a.m. OK Kotlin TESTS 31 155 716800 1300
50049706 glider.g B Feb. 17, 2019, 7:36 a.m. OK Kotlin TESTS 31 186 204800 1300
50016606 Snopka B Feb. 16, 2019, 5:29 p.m. OK Kotlin TESTS 31 202 1228800 1300
50909434 ondrej.konecny B March 6, 2019, 11:47 p.m. OK Kotlin TESTS 31 218 1024000 1300
50017603 spookywooky B Feb. 16, 2019, 5:34 p.m. OK Kotlin TESTS 31 265 1331200 1300
50022605 matej.pristak B Feb. 16, 2019, 5:57 p.m. OK Kotlin TESTS 31 342 1228800 1300
50327740 treasuryonly B Feb. 22, 2019, 5:15 p.m. OK Mono C# TESTS 31 62 2969600 1300
55601659 og.kostya B June 15, 2019, 6:49 p.m. OK Mono C# TESTS 31 62 3788800 1300
50052728 amit1509kumar B Feb. 17, 2019, 8:49 a.m. OK Mono C# TESTS 31 62 6553600 1300
50055555 _SHREDDER_ B Feb. 17, 2019, 10:07 a.m. OK Mono C# TESTS 31 77 6860800 1300
50009113 fr0st B Feb. 16, 2019, 5:03 p.m. OK Mono C# TESTS 31 77 7065600 1300
50094527 satta_93 B Feb. 18, 2019, 12:06 p.m. OK Mono C# TESTS 31 77 7065600 1300
50622213 fastnoise B March 1, 2019, 2:52 a.m. OK Mono C# TESTS 31 78 7065600 1300
50023213 Coder_D B Feb. 16, 2019, 6:01 p.m. OK Mono C# TESTS 31 93 6553600 1300
50071044 zazak B Feb. 17, 2019, 5:45 p.m. OK Mono C# TESTS 31 93 7065600 1300
51418431 nemars B March 17, 2019, 3:15 p.m. OK Mono C# TESTS 31 109 12800000 1300
50010281 XDKalia B Feb. 16, 2019, 5:06 p.m. OK MS C++ TESTS 31 31 0 1300
50011813 LZDQ B Feb. 16, 2019, 5:11 p.m. OK MS C++ TESTS 31 31 0 1300
51073590 sdibt2 B March 9, 2019, 8:38 a.m. OK MS C++ TESTS 31 31 204800 1300
50605662 MYSNKS B Feb. 28, 2019, 2:25 p.m. OK MS C++ TESTS 31 31 204800 1300
50227857 vjudge5 B Feb. 20, 2019, 7:50 a.m. OK MS C++ TESTS 31 31 204800 1300
52623880 scorpiowf B April 12, 2019, 1:14 a.m. OK MS C++ TESTS 31 46 0 1300
50686532 hyacinthusorientalis B March 2, 2019, 1:55 p.m. OK MS C++ TESTS 31 46 0 1300
53174499 qcwlmqy B April 23, 2019, 2:21 a.m. OK MS C++ TESTS 31 46 0 1300
64630908 vjudge1 B Nov. 10, 2019, 10:08 a.m. OK MS C++ TESTS 31 46 204800 1300
51978547 vjudge4 B March 29, 2019, 3:18 p.m. OK MS C++ TESTS 31 46 204800 1300
50051989 lyslyslys B Feb. 17, 2019, 8:32 a.m. OK MS C++ 2017 TESTS 31 31 3993600 1300
50101565 nqbinh17 B Feb. 18, 2019, 3:10 p.m. OK MS C++ 2017 TESTS 31 46 0 1300
50014255 siwei B Feb. 16, 2019, 5:20 p.m. OK MS C++ 2017 TESTS 31 46 0 1300
50037878 l4z0 B Feb. 16, 2019, 10:11 p.m. OK MS C++ 2017 TESTS 31 46 0 1300
50015918 dduhovny B Feb. 16, 2019, 5:27 p.m. OK MS C++ 2017 TESTS 31 46 204800 1300
50035306 NASOCHEC B Feb. 16, 2019, 8:30 p.m. OK MS C++ 2017 TESTS 31 46 204800 1300
50245302 Fortin B Feb. 20, 2019, 2:38 p.m. OK MS C++ 2017 TESTS 31 46 204800 1300
50554042 tangbinjie B Feb. 27, 2019, 6:50 a.m. OK MS C++ 2017 TESTS 31 46 204800 1300
54236961 R99 B May 16, 2019, 11:14 a.m. OK MS C++ 2017 TESTS 31 46 204800 1300
59510120 catplatypus B Aug. 26, 2019, 7:40 a.m. OK MS C++ 2017 TESTS 31 46 204800 1300
50562083 Stanislav666 B Feb. 27, 2019, 11:35 a.m. OK PascalABC.NET TESTS 31 218 0 1300
51599318 mm944 B March 21, 2019, 1:54 a.m. OK PascalABC.NET TESTS 31 390 0 1300
50053271 mayakin B Feb. 17, 2019, 9:03 a.m. OK PHP TESTS 31 265 4198400 1300
50088255 ShyngyS B Feb. 18, 2019, 8:47 a.m. OK PHP TESTS 31 546 3788800 1300
50030774 wangkan2001 B Feb. 16, 2019, 6:48 p.m. OK PyPy 2 TESTS 31 124 2150400 1300
50012843 alessandrosolbiati B Feb. 16, 2019, 5:15 p.m. OK PyPy 2 TESTS 31 155 1843200 1300
50041106 idgaf B Feb. 17, 2019, 1:58 a.m. OK PyPy 2 TESTS 31 155 2150400 1300
50007793 shehebe B Feb. 16, 2019, 4:59 p.m. OK PyPy 2 TESTS 31 155 2560000 1300
50022829 art049 B Feb. 16, 2019, 5:59 p.m. OK PyPy 2 TESTS 31 155 3174400 1300
50007927 YESMAths B Feb. 16, 2019, 4:59 p.m. OK PyPy 2 TESTS 31 156 2560000 1300
50006806 conjecture_xyz B Feb. 16, 2019, 4:56 p.m. OK PyPy 2 TESTS 31 170 2150400 1300
50019195 Mukundan314 B Feb. 16, 2019, 5:41 p.m. OK PyPy 2 TESTS 31 170 3174400 1300
51063887 ashok123 B March 9, 2019, 4:54 a.m. OK PyPy 2 TESTS 31 171 2150400 1300
50016095 kbagoli1999 B Feb. 16, 2019, 5:27 p.m. OK PyPy 2 TESTS 31 171 2355200 1300
53609524 syzymon B May 1, 2019, 12:16 p.m. OK PyPy 3 TESTS 31 155 4812800 1300
50064581 Paixao B Feb. 17, 2019, 2:12 p.m. OK PyPy 3 TESTS 31 155 4812800 1300
50007987 index_ B Feb. 16, 2019, 4:59 p.m. OK PyPy 3 TESTS 31 155 4812800 1300
60833872 kopok2 B Sept. 19, 2019, 8:10 a.m. OK PyPy 3 TESTS 31 156 4915200 1300
50401264 toysheeyeyraku B Feb. 23, 2019, 6:21 p.m. OK PyPy 3 TESTS 31 156 5017600 1300
51667854 TriNguyen17 B March 22, 2019, 6:54 a.m. OK PyPy 3 TESTS 31 170 4812800 1300
50056123 tarikisildar B Feb. 17, 2019, 10:25 a.m. OK PyPy 3 TESTS 31 170 4812800 1300
50419834 Sandip_Jana B Feb. 24, 2019, 8:27 a.m. OK PyPy 3 TESTS 31 171 4403200 1300
55102720 deadguy B June 4, 2019, 9:47 p.m. OK PyPy 3 TESTS 31 171 4608000 1300
50013904 bandi.enkh B Feb. 16, 2019, 5:19 p.m. OK PyPy 3 TESTS 31 171 4608000 1300
50068145 wunder9l B Feb. 17, 2019, 4 p.m. OK Python 2 TESTS 31 202 2457600 1300
50019854 fortmax120 B Feb. 16, 2019, 5:43 p.m. OK Python 2 TESTS 31 202 2560000 1300
50291458 noob77777 B Feb. 21, 2019, 5:41 p.m. OK Python 2 TESTS 31 233 2560000 1300
50039571 rufrist B Feb. 17, 2019, 12:10 a.m. OK Python 2 TESTS 31 311 2457600 1300
50061118 bhuwanchandra.it B Feb. 17, 2019, 12:41 p.m. OK Python 2 TESTS 31 608 2355200 1300
50179520 nealzane B Feb. 19, 2019, 3:18 p.m. OK Python 2 TESTS 31 873 2457600 1300
50240453 theBlindMonk B Feb. 20, 2019, 12:43 p.m. OK Python 2 TESTS 31 935 2457600 1300
50035219 anshuman16423 B Feb. 16, 2019, 8:29 p.m. OK Python 2 TESTS 31 997 2560000 1300
53041141 daotiennamhlvl B April 20, 2019, 9:54 a.m. OK Python 3 TESTS 31 109 2560000 1300
59063404 XAMRMAX B Aug. 19, 2019, 12:12 a.m. OK Python 3 TESTS 31 124 2560000 1300
54518215 Aidos B May 23, 2019, 11:03 a.m. OK Python 3 TESTS 31 124 2560000 1300
50063344 eugalt B Feb. 17, 2019, 1:40 p.m. OK Python 3 TESTS 31 124 2560000 1300
50058857 mame_is_me B Feb. 17, 2019, 11:43 a.m. OK Python 3 TESTS 31 124 2560000 1300
50037162 lIn_nIl B Feb. 16, 2019, 9:36 p.m. OK Python 3 TESTS 31 124 2560000 1300
50029636 dav23rr B Feb. 16, 2019, 6:40 p.m. OK Python 3 TESTS 31 124 2560000 1300
50017852 mame_is_me B Feb. 16, 2019, 5:35 p.m. OK Python 3 TESTS 31 124 2560000 1300
50016862 fergoth B Feb. 16, 2019, 5:30 p.m. OK Python 3 TESTS 31 124 2560000 1300
50013451 dave13 B Feb. 16, 2019, 5:17 p.m. OK Python 3 TESTS 31 124 2560000 1300
50034854 majali B Feb. 16, 2019, 8:22 p.m. OK Ruby TESTS 31 93 4812800 1300
50475417 vjudge3 B Feb. 25, 2019, 5:37 a.m. OK Ruby TESTS 31 139 8089600 1300
50100158 arzk B Feb. 18, 2019, 2:32 p.m. OK Rust TESTS 31 62 614400 1300
50012604 filipmihov B Feb. 16, 2019, 5:14 p.m. OK Scala TESTS 31 499 0 1300
50008364 yakamoto B Feb. 16, 2019, 5:01 p.m. OK Scala TESTS 31 514 0 1300

remove filters

Back to search problems