Codeforces Round 479 (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
977 Codeforces Round 479 (Div. 3) FINISHED False 7200 211823687 May 6, 2018, 2:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 18742 ) D Divide by three, multiply by two PROGRAMMING dfs and similar math sortings 1400

B"Polycarp likes to play with numbers. He takes some integer number x , writes it down on the board, and then performs with it n - 1 operations of the two kinds: After each operation, Polycarp writes down the result on the board and replaces x by the result. So there will be n numbers on the board after all. You are given a sequence of length n -- the numbers that Polycarp wrote down. This sequence is given in arbitrary order, i.e. the order of the sequence can mismatch the order of the numbers written on the board. Your problem is to rearrange (reorder) elements of this sequence in such a way that it can match possible Polycarp's game in the order of the numbers written on the board. I.e. each next number will be exactly two times of the previous number or exactly one third of previous number. It is guaranteed that the answer exists. The first line of the input contatins an integer number n ( 2 <= n <= 100 ) -- the number of the elements in the sequence. The second line of the input contains n integer numbers a_1, a_2, ... , a_n ( 1 <= a_i <= 3 cdot 10^{18} ) -- rearranged (reordered) sequence that Polycarp can wrote down on the board. Print n integer numbers -- rearranged (reordered) input sequence that can be the sequence that Polycarp could write down on the board. It is guaranteed that the answer exists. In the first example the given sequence can be rearranged in the following way: [9, 3, 6, 12, 4, 8] . It can match possible Polycarp's game which started with x = 9 . "...

Tutorials

Codeforces Round #479 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
62317657 31naretidem D Oct. 10, 2019, 3:46 p.m. OK Clang++17 Diagnostics TESTS 26 46 0 1400
64090526 ghosthunterk D Nov. 2, 2019, 12:30 p.m. OK FPC TESTS 26 30 307200 1400
67408995 chaorenhaha D Dec. 22, 2019, 7:35 a.m. OK FPC TESTS 26 31 0 1400
69221866 mth1908 D Jan. 21, 2020, 5:10 a.m. OK GNU C11 TESTS 26 30 0 1400
53601365 ArinaRaguzina D May 1, 2019, 7:52 a.m. OK GNU C11 TESTS 26 30 0 1400
61742416 kaiboy D Oct. 2, 2019, 9 p.m. OK GNU C11 TESTS 26 30 0 1400
56429693 Beams1 D July 2, 2019, 11:28 a.m. OK GNU C11 TESTS 26 31 0 1400
61746420 kaiboy D Oct. 3, 2019, 12:44 a.m. OK GNU C11 TESTS 26 31 0 1400
64728490 Ayyub_Abu_Muadh D Nov. 12, 2019, 7:26 a.m. OK GNU C11 TESTS 26 31 0 1400
67599446 yigezhe D Dec. 25, 2019, 11:22 a.m. OK GNU C11 TESTS 26 31 0 1400
53481169 vjudge4 D April 28, 2019, 8:07 p.m. OK GNU C11 TESTS 26 31 0 1400
55221141 cs234_shrey D June 6, 2019, 7:40 p.m. OK GNU C11 TESTS 26 31 0 1400
55909617 Poppolino D June 22, 2019, 12:25 a.m. OK GNU C11 TESTS 26 31 0 1400
59241687 limabeans D Aug. 21, 2019, 8:05 p.m. OK GNU C++11 TESTS 26 15 0 1400
60349865 JereGod D Sept. 10, 2019, 1:55 p.m. OK GNU C++11 TESTS 26 15 0 1400
65584705 vjudge1 D Nov. 23, 2019, 12:03 p.m. OK GNU C++11 TESTS 26 15 0 1400
62567150 OuDaRjA_17o3oo2 D Oct. 14, 2019, 1:31 p.m. OK GNU C++11 TESTS 26 30 0 1400
69495727 EkEgg D Jan. 25, 2020, 3:46 a.m. OK GNU C++11 TESTS 26 30 0 1400
68978285 Its_Easy D Jan. 17, 2020, 9:42 a.m. OK GNU C++11 TESTS 26 30 0 1400
68933907 monk D Jan. 16, 2020, 12:12 p.m. OK GNU C++11 TESTS 26 30 0 1400
64188646 luogu_bot5 D Nov. 4, 2019, 6:38 a.m. OK GNU C++11 TESTS 26 30 0 1400
64126019 vjudge1 D Nov. 3, 2019, 4:46 a.m. OK GNU C++11 TESTS 26 30 0 1400
63089397 pk.97 D Oct. 21, 2019, 5:48 p.m. OK GNU C++11 TESTS 26 30 0 1400
61421296 Deadpool_1010 D Sept. 28, 2019, 11:50 a.m. OK GNU C++14 TESTS 26 15 0 1400
61600114 Pranav22 D Oct. 1, 2019, 10:34 a.m. OK GNU C++14 TESTS 26 15 0 1400
64371057 a7madsam D Nov. 6, 2019, 2:19 p.m. OK GNU C++14 TESTS 26 15 0 1400
65909922 koulick424 D Nov. 28, 2019, 12:31 p.m. OK GNU C++14 TESTS 26 15 0 1400
65952288 vjudge5 D Nov. 29, 2019, 11:23 a.m. OK GNU C++14 TESTS 26 15 0 1400
66616171 Manthan_144 D Dec. 11, 2019, 4:05 a.m. OK GNU C++14 TESTS 26 15 0 1400
67932032 mayanktanwani D Dec. 29, 2019, 6:22 p.m. OK GNU C++14 TESTS 26 15 0 1400
68417888 rahulahlawat29 D Jan. 8, 2020, 7:51 p.m. OK GNU C++14 TESTS 26 15 0 1400
69179574 rivalq D Jan. 20, 2020, 9:31 a.m. OK GNU C++14 TESTS 26 15 0 1400
69251736 akul007 D Jan. 21, 2020, 2:29 p.m. OK GNU C++14 TESTS 26 15 0 1400
68360643 jagadeeshpalem5 D Jan. 7, 2020, 1:57 p.m. OK GNU C++17 TESTS 26 15 0 1400
68087898 clu-hash-de D Jan. 2, 2020, 4:58 p.m. OK GNU C++17 TESTS 26 15 0 1400
68058089 teapotd D Jan. 1, 2020, 11:54 p.m. OK GNU C++17 TESTS 26 15 0 1400
67946250 slitherhiss D Dec. 30, 2019, 5:27 a.m. OK GNU C++17 TESTS 26 15 0 1400
67500928 poikniok D Dec. 24, 2019, 4:33 a.m. OK GNU C++17 TESTS 26 15 0 1400
66267235 alif_cse_ju D Dec. 4, 2019, 10:58 a.m. OK GNU C++17 TESTS 26 15 0 1400
65617276 tjrac6017203257 D Nov. 24, 2019, 4:29 a.m. OK GNU C++17 TESTS 26 15 0 1400
64668114 vjudge2 D Nov. 11, 2019, 4 a.m. OK GNU C++17 TESTS 26 15 0 1400
62214306 heath_cliff D Oct. 9, 2019, 3:29 p.m. OK GNU C++17 TESTS 26 15 0 1400
61332805 Voldmort D Sept. 26, 2019, 3:31 p.m. OK GNU C++17 TESTS 26 15 0 1400
64637469 mansi_sampat D Nov. 10, 2019, 12:01 p.m. OK Java 11 TESTS 26 233 0 1400
64637411 mansisampat2 D Nov. 10, 2019, noon OK Java 11 TESTS 26 233 0 1400
62947469 mr___hacker____ D Oct. 19, 2019, 5:54 p.m. OK Java 8 TESTS 26 108 0 1400
61596367 vjudge5 D Oct. 1, 2019, 8:59 a.m. OK Java 8 TESTS 26 108 0 1400
60417285 maheshwari29 D Sept. 12, 2019, 3:17 a.m. OK Java 8 TESTS 26 108 0 1400
52641026 bojverdict2 D April 12, 2019, 12:28 p.m. OK Java 8 TESTS 26 108 0 1400
68200661 mayankarora21 D Jan. 4, 2020, 3:36 p.m. OK Java 8 TESTS 26 109 0 1400
69494793 luchy0120 D Jan. 25, 2020, 2:52 a.m. OK Java 8 TESTS 26 109 0 1400
69161103 janit0r D Jan. 19, 2020, 11:46 p.m. OK Java 8 TESTS 26 109 0 1400
66807316 Ahmed_Hosssam D Dec. 13, 2019, 10:22 p.m. OK Java 8 TESTS 26 109 0 1400
66605863 Agnimandur D Dec. 10, 2019, 6:28 p.m. OK Java 8 TESTS 26 109 0 1400
65908182 sun_ny D Nov. 28, 2019, 11:52 a.m. OK Java 8 TESTS 26 109 0 1400
59874206 mayakwd D Sept. 1, 2019, 9:30 p.m. OK Kotlin TESTS 26 155 409600 1400
59820080 Hadjar D Aug. 31, 2019, 4:58 p.m. OK Kotlin TESTS 26 155 819200 1400
59817975 KanhuKeNanu D Aug. 31, 2019, 4:07 p.m. OK Kotlin TESTS 26 171 1126400 1400
69482892 h__h D Jan. 24, 2020, 6:23 p.m. OK Kotlin TESTS 26 171 1228800 1400
63655592 hibatibati D Oct. 28, 2019, 12:36 p.m. OK Mono C# TESTS 26 77 3584000 1400
57785387 TianZuiXing D July 26, 2019, 7:34 a.m. OK MS C++ TESTS 26 30 0 1400
52478579 vjudge3 D April 8, 2019, 2:45 a.m. OK MS C++ TESTS 26 30 0 1400
52085204 vjudge1 D March 31, 2019, 2:03 p.m. OK MS C++ TESTS 26 30 0 1400
62096789 vjudge1 D Oct. 8, 2019, 7:49 a.m. OK MS C++ TESTS 26 30 0 1400
65582833 lyphaha D Nov. 23, 2019, 11:31 a.m. OK MS C++ TESTS 26 30 0 1400
63785245 1912607519 D Oct. 30, 2019, 12:08 p.m. OK MS C++ TESTS 26 30 102400 1400
54374895 vjudge1 D May 19, 2019, 8:21 a.m. OK MS C++ TESTS 26 30 204800 1400
59648592 vjudge3 D Aug. 29, 2019, 7:07 a.m. OK MS C++ TESTS 26 30 204800 1400
69726160 vjudge3 D Jan. 29, 2020, 12:19 p.m. OK MS C++ TESTS 26 31 0 1400
69877993 vjudge2 D Jan. 31, 2020, 5:06 a.m. OK MS C++ TESTS 26 31 0 1400
59778820 vjudge4 D Aug. 31, 2019, 1:45 a.m. OK MS C++ 2017 TESTS 26 30 0 1400
55969006 PedroTigre D June 23, 2019, 1:42 p.m. OK MS C++ 2017 TESTS 26 30 0 1400
53673107 cebrf D May 2, 2019, 2:15 p.m. OK MS C++ 2017 TESTS 26 30 0 1400
53631770 valentina2000 D May 1, 2019, 3:39 p.m. OK MS C++ 2017 TESTS 26 30 0 1400
65759133 vjudge4 D Nov. 26, 2019, 3:08 p.m. OK MS C++ 2017 TESTS 26 31 0 1400
64307873 vjudge3 D Nov. 5, 2019, 11:54 a.m. OK MS C++ 2017 TESTS 26 31 0 1400
63733754 TianPingXing D Oct. 29, 2019, 2:44 p.m. OK MS C++ 2017 TESTS 26 31 0 1400
63724746 TianPingXing D Oct. 29, 2019, 12:23 p.m. OK MS C++ 2017 TESTS 26 31 0 1400
59791591 XuZZ D Aug. 31, 2019, 7:20 a.m. OK MS C++ 2017 TESTS 26 31 0 1400
59655822 vjudge3 D Aug. 29, 2019, 10:18 a.m. OK MS C++ 2017 TESTS 26 31 0 1400
53873019 raj1307 D May 8, 2019, 10:26 a.m. OK PyPy 2 TESTS 26 234 1228800 1400
54877444 Zuizehongquaunha D May 31, 2019, 12:31 p.m. OK PyPy 3 TESTS 26 124 0 1400
54652751 Aidos D May 26, 2019, 6:30 a.m. OK PyPy 3 TESTS 26 124 0 1400
53321945 hrustim25 D April 26, 2019, 1:20 p.m. OK PyPy 3 TESTS 26 124 0 1400
61089465 kuna_learn D Sept. 22, 2019, 8:16 p.m. OK PyPy 3 TESTS 26 139 0 1400
57756108 Nil_Sinyaev D July 25, 2019, 4:21 p.m. OK PyPy 3 TESTS 26 139 1331200 1400
61093937 kuna_learn D Sept. 23, 2019, 1 a.m. OK PyPy 3 TESTS 26 139 3481600 1400
66790120 octopussy2 D Dec. 13, 2019, 2:59 p.m. OK PyPy 3 TESTS 26 140 0 1400
65790898 daleks D Nov. 26, 2019, 10:22 p.m. OK PyPy 3 TESTS 26 140 0 1400
61214878 neterukun D Sept. 24, 2019, 12:28 p.m. OK PyPy 3 TESTS 26 140 0 1400
61049318 kuna_learn D Sept. 22, 2019, 5:53 a.m. OK PyPy 3 TESTS 26 140 0 1400
53960670 vjudge1 D May 10, 2019, 1:59 p.m. OK Python 2 TESTS 26 156 0 1400
54321253 codeurway_codeforces D May 17, 2019, 9:24 p.m. OK Python 3 TESTS 26 108 0 1400
68292363 vulcanx21 D Jan. 5, 2020, 10:28 p.m. OK Python 3 TESTS 26 109 0 1400
60276640 LintuStorm D Sept. 8, 2019, 6:11 p.m. OK Python 3 TESTS 26 109 0 1400
56024534 Never_underestimate_me D June 25, 2019, 6:14 a.m. OK Python 3 TESTS 26 109 0 1400
55116599 PhmHngThai D June 5, 2019, 8:57 a.m. OK Python 3 TESTS 26 109 0 1400
55007470 AnkushSharma D June 3, 2019, 8:20 a.m. OK Python 3 TESTS 26 109 0 1400
54697105 PolyushkaPlyushka D May 26, 2019, 7:44 p.m. OK Python 3 TESTS 26 109 0 1400
54085842 allprecisely D May 14, 2019, 7:19 a.m. OK Python 3 TESTS 26 109 0 1400
54012961 Sait2000 D May 12, 2019, 4:21 a.m. OK Python 3 TESTS 26 109 0 1400
53961525 vjudge5 D May 10, 2019, 2:30 p.m. OK Python 3 TESTS 26 109 0 1400
64729746 techaddict D Nov. 12, 2019, 7:57 a.m. OK Scala TESTS 26 468 0 1400

remove filters

Back to search problems