Codeforces Round 595 (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
1249 Codeforces Round 595 (Div. 3) FINISHED False 8100 165684287 Oct. 22, 2019, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 12801 ) C2 Good Numbers (hard version) PROGRAMMING binary search greedy math meet-in-the-middle 1500

B'The only difference between easy and hard versions is the maximum value of n . You are given a positive integer number n . You really love good numbers so you want to find the smallest good number greater than or equal to n . The positive integer is called good if it can be represented as a sum of distinct powers of 3 (i.e. no duplicates of powers of 3 are allowed). For example: Note, that there exist other representations of 19 and 20 as sums of powers of 3 but none of them consists of distinct powers of 3 . For the given positive integer n find such smallest m ( n <= m ) that m is a good number. You have to answer q independent queries. The first line of the input contains one integer q ( 1 <= q <= 500 ) -- the number of queries. Then q queries follow. The only line of the query contains one integer n ( 1 <= n <= 10^{18} ). For each query, print such smallest integer m (where n <= m ) that m is a good number. '...

Tutorials

Codeforces Round #595 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
64328437 ruban C2 Nov. 5, 2019, 6:16 p.m. OK Delphi TESTS 15 31 13721600 1500
63250343 Just_Matvey C2 Oct. 23, 2019, 3:50 p.m. OK FPC TESTS 15 31 0 1500
63871506 samay_kothari C2 Oct. 30, 2019, 5:40 p.m. OK GNU C11 TESTS 15 31 0 1500
63741180 AurumnPegasus C2 Oct. 29, 2019, 4:59 p.m. OK GNU C11 TESTS 15 31 0 1500
63354736 kaiboy C2 Oct. 25, 2019, 1:32 a.m. OK GNU C11 TESTS 15 31 0 1500
63350854 kaiboy C2 Oct. 24, 2019, 9:47 p.m. OK GNU C11 TESTS 15 31 0 1500
63236765 MOHIR_MBSTU C2 Oct. 23, 2019, 12:29 p.m. OK GNU C11 TESTS 15 31 0 1500
63227812 DevJewel C2 Oct. 23, 2019, 9:53 a.m. OK GNU C11 TESTS 15 31 0 1500
68487654 dongbin1999 C2 Jan. 10, 2020, 10:26 a.m. OK GNU C11 TESTS 15 31 0 1500
68340978 luogu_bot3 C2 Jan. 7, 2020, 3:34 a.m. OK GNU C11 TESTS 15 31 0 1500
63915275 jschr C2 Oct. 31, 2019, 9:50 a.m. OK GNU C11 TESTS 15 31 0 1500
63943689 cdza C2 Oct. 31, 2019, 6:12 p.m. OK GNU C11 TESTS 15 31 3174400 1500
63269268 Weierstrass C2 Oct. 24, 2019, 2:53 a.m. OK GNU C++11 TESTS 15 15 0 1500
63245698 luogu_bot1 C2 Oct. 23, 2019, 2:36 p.m. OK GNU C++11 TESTS 15 15 0 1500
63241666 Jaamil C2 Oct. 23, 2019, 1:36 p.m. OK GNU C++11 TESTS 15 15 0 1500
65639392 vjudge4 C2 Nov. 24, 2019, 8:52 a.m. OK GNU C++11 TESTS 15 15 0 1500
65300380 Pyqe C2 Nov. 18, 2019, 1:02 p.m. OK GNU C++11 TESTS 15 15 0 1500
65277937 smax C2 Nov. 18, 2019, 3:15 a.m. OK GNU C++11 TESTS 15 15 0 1500
63642347 arron_tij C2 Oct. 28, 2019, 8:31 a.m. OK GNU C++11 TESTS 15 15 0 1500
63421623 vjudge5 C2 Oct. 26, 2019, 6:35 a.m. OK GNU C++11 TESTS 15 15 0 1500
63298582 vjudge1 C2 Oct. 24, 2019, 1:38 p.m. OK GNU C++11 TESTS 15 15 0 1500
63273376 xukuan C2 Oct. 24, 2019, 5:36 a.m. OK GNU C++11 TESTS 15 15 0 1500
69170976 vjudge1 C2 Jan. 20, 2020, 6:09 a.m. OK GNU C++14 TESTS 15 15 0 1500
68875270 aman_garg001 C2 Jan. 15, 2020, 4:42 p.m. OK GNU C++14 TESTS 15 15 0 1500
68985168 _dragon C2 Jan. 17, 2020, 12:13 p.m. OK GNU C++14 TESTS 15 15 0 1500
68400758 Gagan_Dhakrey C2 Jan. 8, 2020, 1:04 p.m. OK GNU C++14 TESTS 15 15 0 1500
68162771 BrokenBlade C2 Jan. 4, 2020, 11:36 a.m. OK GNU C++14 TESTS 15 15 0 1500
68072937 Luzivanlt C2 Jan. 2, 2020, 11:12 a.m. OK GNU C++14 TESTS 15 15 0 1500
67968312 Lupne C2 Dec. 30, 2019, 2:06 p.m. OK GNU C++14 TESTS 15 15 0 1500
67931024 Dinesh_hardasani C2 Dec. 29, 2019, 6 p.m. OK GNU C++14 TESTS 15 15 0 1500
67876478 Agla_Sem_Phodungi C2 Dec. 29, 2019, 1:30 p.m. OK GNU C++14 TESTS 15 15 0 1500
67772927 698592418 C2 Dec. 28, 2019, 7:38 a.m. OK GNU C++14 TESTS 15 15 0 1500
68600544 Roberticey C2 Jan. 11, 2020, 1:59 p.m. OK GNU C++17 TESTS 15 15 0 1500
69549224 Huglio C2 Jan. 26, 2020, 5:30 a.m. OK GNU C++17 TESTS 15 15 0 1500
69438401 __Agent47__ C2 Jan. 23, 2020, 8:04 p.m. OK GNU C++17 TESTS 15 15 0 1500
69031194 Childe_Zhe C2 Jan. 18, 2020, 8:09 a.m. OK GNU C++17 TESTS 15 15 0 1500
68966447 Self_patroit C2 Jan. 17, 2020, 5:09 a.m. OK GNU C++17 TESTS 15 15 0 1500
68964768 darele C2 Jan. 17, 2020, 4:05 a.m. OK GNU C++17 TESTS 15 15 0 1500
68874639 OctoBronze C2 Jan. 15, 2020, 4:28 p.m. OK GNU C++17 TESTS 15 15 0 1500
68851786 mohit1O98 C2 Jan. 15, 2020, 9:12 a.m. OK GNU C++17 TESTS 15 15 0 1500
68652366 abhinav698 C2 Jan. 12, 2020, 11:09 a.m. OK GNU C++17 TESTS 15 15 0 1500
68367860 topovik C2 Jan. 7, 2020, 4:38 p.m. OK GNU C++17 TESTS 15 15 0 1500
63351263 stefan.sakalik C2 Oct. 24, 2019, 10:06 p.m. OK Go TESTS 15 15 0 1500
63418879 yang12138 C2 Oct. 26, 2019, 5:39 a.m. OK Go TESTS 15 30 0 1500
63432898 maguroguma C2 Oct. 26, 2019, 9:39 a.m. OK Go TESTS 15 31 0 1500
63356981 synapse C2 Oct. 25, 2019, 3:17 a.m. OK Go TESTS 15 31 0 1500
64735324 brosucks C2 Nov. 12, 2019, 10:05 a.m. OK Go TESTS 15 46 0 1500
63216486 ivanzuki C2 Oct. 23, 2019, 6:16 a.m. OK Go TESTS 15 62 0 1500
63239320 maguroguma C2 Oct. 23, 2019, 1:03 p.m. OK Go TESTS 15 467 40857600 1500
67139157 lightseba C2 Dec. 18, 2019, 5:55 a.m. OK Java 11 TESTS 15 171 0 1500
65500720 pizzaEater C2 Nov. 21, 2019, 6:44 p.m. OK Java 11 TESTS 15 186 0 1500
63303525 LightYagami674 C2 Oct. 24, 2019, 2:56 p.m. OK Java 11 TESTS 15 187 0 1500
63291655 tapanr97 C2 Oct. 24, 2019, 11:55 a.m. OK Java 11 TESTS 15 187 0 1500
63277658 sushant_verma C2 Oct. 24, 2019, 7:32 a.m. OK Java 11 TESTS 15 202 0 1500
63232935 ankyy_0103 C2 Oct. 23, 2019, 11:31 a.m. OK Java 11 TESTS 15 202 0 1500
64503854 raindragon C2 Nov. 8, 2019, 5:52 a.m. OK Java 11 TESTS 15 217 0 1500
69644552 alankritanand001 C2 Jan. 27, 2020, 11:41 p.m. OK Java 11 TESTS 15 218 0 1500
65512013 bluesky111 C2 Nov. 22, 2019, 4:38 a.m. OK Java 11 TESTS 15 218 0 1500
63278761 Xiao_Tou C2 Oct. 24, 2019, 7:56 a.m. OK Java 11 TESTS 15 218 0 1500
63231287 inseder C2 Oct. 23, 2019, 11:03 a.m. OK Java 8 TESTS 15 108 0 1500
63407254 jdurie C2 Oct. 25, 2019, 9:05 p.m. OK Java 8 TESTS 15 109 0 1500
69248662 luchy0120 C2 Jan. 21, 2020, 1:39 p.m. OK Java 8 TESTS 15 109 0 1500
68454386 GiantTornado C2 Jan. 9, 2020, 3:35 p.m. OK Java 8 TESTS 15 109 0 1500
68453668 GiantTornado C2 Jan. 9, 2020, 3:17 p.m. OK Java 8 TESTS 15 109 0 1500
67410335 octopusPrime C2 Dec. 22, 2019, 8:05 a.m. OK Java 8 TESTS 15 109 0 1500
64524239 Nutella3000 C2 Nov. 8, 2019, 1:16 p.m. OK Java 8 TESTS 15 109 0 1500
63912562 Piccadilly C2 Oct. 31, 2019, 8:51 a.m. OK Java 8 TESTS 15 109 0 1500
63902506 Faizan C2 Oct. 31, 2019, 5:18 a.m. OK Java 8 TESTS 15 109 0 1500
63506201 lzhang C2 Oct. 26, 2019, 6:47 p.m. OK Java 8 TESTS 15 109 0 1500
63759689 mendel_vv C2 Oct. 30, 2019, 2:48 a.m. OK Kotlin TESTS 15 140 0 1500
63208980 Spheniscine C2 Oct. 23, 2019, 2:26 a.m. OK Kotlin TESTS 15 140 512000 1500
63208693 Spheniscine C2 Oct. 23, 2019, 2:12 a.m. OK Kotlin TESTS 15 140 512000 1500
63763107 satyamcse C2 Oct. 30, 2019, 5:01 a.m. OK Kotlin TESTS 15 155 0 1500
63860675 mirennn C2 Oct. 30, 2019, 4:47 p.m. OK Kotlin TESTS 15 155 0 1500
66142116 hyper_sinnniy C2 Dec. 1, 2019, 2:54 p.m. OK Kotlin TESTS 15 171 0 1500
63753175 kiuny C2 Oct. 29, 2019, 9:25 p.m. OK Kotlin TESTS 15 171 204800 1500
63282112 Black_Fregat C2 Oct. 24, 2019, 9:03 a.m. OK Kotlin TESTS 15 187 0 1500
63742925 Tan42 C2 Oct. 29, 2019, 5:34 p.m. OK Mono C# TESTS 15 46 0 1500
63233995 Vovlik C2 Oct. 23, 2019, 11:48 a.m. OK Mono C# TESTS 15 61 0 1500
63284729 hloya C2 Oct. 24, 2019, 9:55 a.m. OK Mono C# TESTS 15 61 102400 1500
64732026 NEvOl C2 Nov. 12, 2019, 8:48 a.m. OK Mono C# TESTS 15 62 307200 1500
63262708 m1_k3 C2 Oct. 23, 2019, 9:14 p.m. OK Mono C# TESTS 15 109 4915200 1500
63283700 vjudge5 C2 Oct. 24, 2019, 9:34 a.m. OK MS C++ TESTS 15 15 0 1500
63719461 vjudge5 C2 Oct. 29, 2019, 10:55 a.m. OK MS C++ TESTS 15 15 0 1500
63239577 vjudge5 C2 Oct. 23, 2019, 1:07 p.m. OK MS C++ TESTS 15 30 0 1500
63519706 vjudge5 C2 Oct. 27, 2019, 3:08 a.m. OK MS C++ TESTS 15 30 0 1500
63626285 vjudge5 C2 Oct. 28, 2019, 3:57 a.m. OK MS C++ TESTS 15 30 0 1500
65947199 vjudge2 C2 Nov. 29, 2019, 9:12 a.m. OK MS C++ TESTS 15 31 0 1500
69876949 joyguru55 C2 Jan. 31, 2020, 4:34 a.m. OK MS C++ TESTS 15 31 0 1500
68435597 vjudge5 C2 Jan. 9, 2020, 8:51 a.m. OK MS C++ TESTS 15 31 0 1500
66401120 vjudge5 C2 Dec. 6, 2019, 12:19 p.m. OK MS C++ TESTS 15 31 0 1500
66009231 vjudge3 C2 Nov. 30, 2019, 1:11 a.m. OK MS C++ TESTS 15 31 0 1500
63380785 GeKa C2 Oct. 25, 2019, 12:24 p.m. OK MS C++ 2017 TESTS 15 15 0 1500
63223314 2018030401093 C2 Oct. 23, 2019, 8:33 a.m. OK MS C++ 2017 TESTS 15 30 0 1500
63966219 hwangganzi C2 Nov. 1, 2019, 7:17 a.m. OK MS C++ 2017 TESTS 15 30 0 1500
65739621 vjudge5 C2 Nov. 26, 2019, 9:32 a.m. OK MS C++ 2017 TESTS 15 30 0 1500
66584432 YaMi506 C2 Dec. 10, 2019, 10:38 a.m. OK MS C++ 2017 TESTS 15 30 0 1500
67868310 Parsa84 C2 Dec. 29, 2019, 10:29 a.m. OK MS C++ 2017 TESTS 15 30 0 1500
63208091 phuoc_ban C2 Oct. 23, 2019, 1:39 a.m. OK MS C++ 2017 TESTS 15 30 307200 1500
69669714 vjudge3 C2 Jan. 28, 2020, 12:36 p.m. OK MS C++ 2017 TESTS 15 31 0 1500
69587811 kurs C2 Jan. 26, 2020, 8:31 p.m. OK MS C++ 2017 TESTS 15 31 0 1500
68237167 AleksanderBalobanov C2 Jan. 5, 2020, 11:24 a.m. OK MS C++ 2017 TESTS 15 31 0 1500
66167573 yumtam C2 Dec. 2, 2019, 8:29 a.m. OK PyPy 2 TESTS 15 187 1024000 1500
63547199 MARIOKOD_MC C2 Oct. 27, 2019, 10:49 a.m. OK PyPy 2 TESTS 15 202 1945600 1500
63224127 iamprayush C2 Oct. 23, 2019, 8:46 a.m. OK PyPy 2 TESTS 15 218 3481600 1500
63353613 _Kee C2 Oct. 25, 2019, 12:25 a.m. OK PyPy 3 TESTS 15 155 2150400 1500
66987141 ffsgfy C2 Dec. 15, 2019, 6:36 p.m. OK PyPy 3 TESTS 15 155 2355200 1500
63215815 hase_0o0 C2 Oct. 23, 2019, 6:04 a.m. OK PyPy 3 TESTS 15 155 2560000 1500
63201074 HimanshuGwalani C2 Oct. 22, 2019, 8:32 p.m. OK PyPy 3 TESTS 15 170 2560000 1500
63354379 kshitij_coder C2 Oct. 25, 2019, 1:10 a.m. OK PyPy 3 TESTS 15 170 3072000 1500
63227399 Vinay_Katare C2 Oct. 23, 2019, 9:46 a.m. OK PyPy 3 TESTS 15 170 3072000 1500
63276047 Aldenys C2 Oct. 24, 2019, 6:52 a.m. OK PyPy 3 TESTS 15 170 3174400 1500
63786574 normalboot C2 Oct. 30, 2019, 12:29 p.m. OK PyPy 3 TESTS 15 171 2969600 1500
63666848 YasarTK C2 Oct. 28, 2019, 3:37 p.m. OK PyPy 3 TESTS 15 171 2969600 1500
63568724 UTMoonlight C2 Oct. 27, 2019, 3:46 p.m. OK PyPy 3 TESTS 15 171 2969600 1500
63256666 eugalt C2 Oct. 23, 2019, 6:27 p.m. OK Python 2 TESTS 15 171 0 1500
63256613 eugalt C2 Oct. 23, 2019, 6:26 p.m. OK Python 2 TESTS 15 171 0 1500
64149713 kalrover C2 Nov. 3, 2019, 11 a.m. OK Python 2 TESTS 15 186 0 1500
63235865 Madhur1906 C2 Oct. 23, 2019, 12:16 p.m. OK Python 2 TESTS 15 186 102400 1500
69472470 soumyasarkar1998 C2 Jan. 24, 2020, 3 p.m. OK Python 2 TESTS 15 187 0 1500
63263390 eugalt C2 Oct. 23, 2019, 9:42 p.m. OK Python 2 TESTS 15 187 0 1500
63257254 eugalt C2 Oct. 23, 2019, 6:41 p.m. OK Python 2 TESTS 15 187 0 1500
63229995 ashashwat C2 Oct. 23, 2019, 10:38 a.m. OK Python 2 TESTS 15 187 0 1500
67408628 gagannagpal68 C2 Dec. 22, 2019, 7:27 a.m. OK Python 2 TESTS 15 202 0 1500
63925976 SoSooding C2 Oct. 31, 2019, 1:01 p.m. OK Python 2 TESTS 15 202 0 1500
63761014 Salmonize C2 Oct. 30, 2019, 3:42 a.m. OK Python 3 TESTS 15 109 0 1500
63381177 orailly C2 Oct. 25, 2019, 12:30 p.m. OK Python 3 TESTS 15 109 0 1500
63358689 RohitHansdah C2 Oct. 25, 2019, 4:19 a.m. OK Python 3 TESTS 15 109 0 1500
63358322 andinet C2 Oct. 25, 2019, 4:06 a.m. OK Python 3 TESTS 15 109 0 1500
63256590 shivank98 C2 Oct. 23, 2019, 6:25 p.m. OK Python 3 TESTS 15 109 0 1500
63219650 silvergray C2 Oct. 23, 2019, 7:30 a.m. OK Python 3 TESTS 15 109 0 1500
63317764 spnooyseed C2 Oct. 24, 2019, 3:41 p.m. OK Python 3 TESTS 15 109 204800 1500
63246934 LKSH2018 C2 Oct. 23, 2019, 2:55 p.m. OK Python 3 TESTS 15 109 204800 1500
69730414 Hinokami C2 Jan. 29, 2020, 1:23 p.m. OK Python 3 TESTS 15 109 307200 1500
64568414 vjudge1 C2 Nov. 9, 2019, 8:20 a.m. OK Python 3 TESTS 15 109 307200 1500
64699878 maxglushkov561 C2 Nov. 11, 2019, 2:29 p.m. OK Rust TESTS 15 31 0 1500
64343649 tpoeiras C2 Nov. 6, 2019, 4:46 a.m. OK Rust TESTS 15 46 0 1500

remove filters

Back to search problems