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 |
---|---|---|---|---|---|---|
1348 | Codeforces Round 638 (Div. 2) | FINISHED | False | 9000 | 148836263 | May 1, 2020, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 8962 ) | D | Phoenix and Science | PROGRAMMING | binary search bitmasks constructive algorithms greedy math | 1900 |
B'Phoenix has decided to become a scientist! He is currently investigating the growth of bacteria. Initially, on day 1 , there is one bacterium with mass 1 . Every day, some number of bacteria will split (possibly zero or all). When a bacterium of mass m splits, it becomes two bacteria of mass frac{m}{2} each. For example, a bacterium of mass 3 can split into two bacteria of mass 1.5 . Also, every night, the mass of every bacteria will increase by one. Phoenix is wondering if it is possible for the total mass of all the bacteria to be exactly n . If it is possible, he is interested in the way to obtain that mass using the minimum possible number of nights. Help him become the best scientist! The input consists of multiple test cases. The first line contains an integer t ( 1 <= t <= 1000 ) -- the number of test cases. The first line of each test case contains an integer n ( 2 <= n <= 10^9 ) -- the sum of bacteria masses that Phoenix is interested in. For each test case, if there is no way for the bacteria to exactly achieve total mass n , print -1. Otherwise, print two lines. The first line should contain an integer d -- the minimum number of nights needed. The next line should contain d integers, with the i -th integer representing the number of bacteria that should split on the i -th day. If there are multiple solutions, print any. In the first test case, the following process results in bacteria with total mass 9 : In the second test case, the following process results in bacteria with total mass 11 : In the third test case, the bacterium does not split on day 1 , and then grows to mass 2 during night 1 . '... |
Codeforces Round #638 (Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
78725738 | cedretaber | D | May 1, 2020, 4:18 p.m. | OK | D | TESTS | 13 | 31 | 1945600 | 1900 | |
78726020 | Gassa | D | May 1, 2020, 4:18 p.m. | OK | D | TESTS | 13 | 46 | 0 | 1900 | |
78710413 | rainboy | D | May 1, 2020, 3:46 p.m. | OK | GNU C11 | TESTS | 13 | 124 | 204800 | 1900 | |
78729064 | pengin_2000 | D | May 1, 2020, 4:25 p.m. | OK | GNU C11 | TESTS | 13 | 202 | 0 | 1900 | |
78711456 | greatgu | D | May 1, 2020, 3:48 p.m. | OK | GNU C++11 | TESTS | 13 | 15 | 0 | 1900 | |
78747544 | serotonin | D | May 1, 2020, 5:59 p.m. | OK | GNU C++11 | TESTS | 13 | 30 | 0 | 1900 | |
78743296 | LightningUZ | D | May 1, 2020, 5:01 p.m. | OK | GNU C++11 | TESTS | 13 | 30 | 0 | 1900 | |
78742670 | zghtyarecrenj | D | May 1, 2020, 4:59 p.m. | OK | GNU C++11 | TESTS | 13 | 30 | 0 | 1900 | |
78736120 | whx1003 | D | May 1, 2020, 4:43 p.m. | OK | GNU C++11 | TESTS | 13 | 30 | 0 | 1900 | |
78722041 | liyuting | D | May 1, 2020, 4:10 p.m. | OK | GNU C++11 | TESTS | 13 | 30 | 0 | 1900 | |
78749569 | kkogoro | D | May 1, 2020, 6:13 p.m. | OK | GNU C++11 | TESTS | 13 | 30 | 0 | 1900 | |
78745119 | hyta4982 | D | May 1, 2020, 5:04 p.m. | OK | GNU C++11 | TESTS | 13 | 30 | 204800 | 1900 | |
78732358 | SONGYJ9 | D | May 1, 2020, 4:34 p.m. | OK | GNU C++11 | TESTS | 13 | 30 | 409600 | 1900 | |
78741736 | HHHEN | D | May 1, 2020, 4:57 p.m. | OK | GNU C++11 | TESTS | 13 | 30 | 819200 | 1900 | |
78755454 | Rdpaula | D | May 1, 2020, 7:10 p.m. | OK | GNU C++14 | TESTS | 13 | 15 | 0 | 1900 | |
78716042 | jianzhi | D | May 1, 2020, 3:57 p.m. | OK | GNU C++14 | TESTS | 13 | 15 | 0 | 1900 | |
78751339 | avinash.ee61 | D | May 1, 2020, 6:27 p.m. | OK | GNU C++14 | TESTS | 13 | 15 | 102400 | 1900 | |
78756664 | ChEcKMatE_123 | D | May 1, 2020, 7:25 p.m. | OK | GNU C++14 | TESTS | 13 | 15 | 102400 | 1900 | |
78754876 | _i_mean_its_mine_ | D | May 1, 2020, 7:02 p.m. | OK | GNU C++14 | TESTS | 13 | 15 | 102400 | 1900 | |
78720636 | Tanmay414 | D | May 1, 2020, 4:06 p.m. | OK | GNU C++14 | TESTS | 13 | 15 | 204800 | 1900 | |
78716154 | goatzyq | D | May 1, 2020, 3:57 p.m. | OK | GNU C++14 | TESTS | 13 | 15 | 204800 | 1900 | |
78744263 | idgaf | D | May 1, 2020, 5:02 p.m. | OK | GNU C++14 | TESTS | 13 | 15 | 204800 | 1900 | |
78757979 | shivam011 | D | May 1, 2020, 7:43 p.m. | OK | GNU C++14 | TESTS | 13 | 15 | 204800 | 1900 | |
78763927 | AnshulG | D | May 1, 2020, 9:17 p.m. | OK | GNU C++14 | TESTS | 13 | 15 | 3174400 | 1900 | |
78715058 | wiwitrifai | D | May 1, 2020, 3:55 p.m. | OK | GNU C++17 | TESTS | 13 | 15 | 0 | 1900 | |
78729972 | SSYernar | D | May 1, 2020, 4:27 p.m. | OK | GNU C++17 | TESTS | 13 | 15 | 204800 | 1900 | |
78766884 | Kaneki-kun | D | May 1, 2020, 10:22 p.m. | OK | GNU C++17 | TESTS | 13 | 15 | 204800 | 1900 | |
78762825 | sorai_nai | D | May 1, 2020, 8:56 p.m. | OK | GNU C++17 | TESTS | 13 | 15 | 204800 | 1900 | |
78759976 | bernardo_amorim | D | May 1, 2020, 8:11 p.m. | OK | GNU C++17 | TESTS | 13 | 15 | 204800 | 1900 | |
78756804 | -Chim- | D | May 1, 2020, 7:27 p.m. | OK | GNU C++17 | TESTS | 13 | 15 | 204800 | 1900 | |
78734328 | minmise | D | May 1, 2020, 4:38 p.m. | OK | GNU C++17 | TESTS | 13 | 15 | 204800 | 1900 | |
78738288 | direks | D | May 1, 2020, 4:49 p.m. | OK | GNU C++17 | TESTS | 13 | 15 | 409600 | 1900 | |
78762571 | A_man909 | D | May 1, 2020, 8:52 p.m. | OK | GNU C++17 | TESTS | 13 | 30 | 0 | 1900 | |
78766309 | Roll_Num_56 | D | May 1, 2020, 10:07 p.m. | OK | GNU C++17 | TESTS | 13 | 30 | 0 | 1900 | |
78755592 | syawl-1017 | D | May 1, 2020, 7:11 p.m. | OK | GNU C++17 (64) | TESTS | 13 | 15 | 0 | 1900 | |
78749257 | -osdajigu- | D | May 1, 2020, 6:11 p.m. | OK | GNU C++17 (64) | TESTS | 13 | 15 | 0 | 1900 | |
78748716 | passer_ | D | May 1, 2020, 6:07 p.m. | OK | GNU C++17 (64) | TESTS | 13 | 15 | 0 | 1900 | |
78742489 | Hyado | D | May 1, 2020, 4:59 p.m. | OK | GNU C++17 (64) | TESTS | 13 | 15 | 0 | 1900 | |
78741803 | plasma-effect | D | May 1, 2020, 4:57 p.m. | OK | GNU C++17 (64) | TESTS | 13 | 15 | 0 | 1900 | |
78735040 | curly_braces | D | May 1, 2020, 4:40 p.m. | OK | GNU C++17 (64) | TESTS | 13 | 15 | 0 | 1900 | |
78732479 | tanimania | D | May 1, 2020, 4:34 p.m. | OK | GNU C++17 (64) | TESTS | 13 | 15 | 0 | 1900 | |
78729640 | haruki_K | D | May 1, 2020, 4:27 p.m. | OK | GNU C++17 (64) | TESTS | 13 | 15 | 0 | 1900 | |
78766829 | PolyAtomicIon | D | May 1, 2020, 10:21 p.m. | OK | GNU C++17 (64) | TESTS | 13 | 15 | 0 | 1900 | |
78766014 | Zeus_NoT_Zues | D | May 1, 2020, 10:02 p.m. | OK | GNU C++17 (64) | TESTS | 13 | 15 | 0 | 1900 | |
78763636 | anuragshirolkar | D | May 1, 2020, 9:12 p.m. | OK | Haskell | TESTS | 13 | 46 | 102400 | 1900 | |
78725519 | Russell_Emerine | D | May 1, 2020, 4:17 p.m. | OK | Haskell | TESTS | 13 | 46 | 102400 | 1900 | |
78750988 | avijit_agarwal | D | May 1, 2020, 6:24 p.m. | OK | Java 11 | TESTS | 13 | 186 | 0 | 1900 | |
78750269 | Leewings | D | May 1, 2020, 6:18 p.m. | OK | Java 11 | TESTS | 13 | 186 | 0 | 1900 | |
78749419 | wabadabakalakaboo | D | May 1, 2020, 6:12 p.m. | OK | Java 11 | TESTS | 13 | 187 | 0 | 1900 | |
78744517 | Unum | D | May 1, 2020, 5:03 p.m. | OK | Java 11 | TESTS | 13 | 187 | 0 | 1900 | |
78738254 | Tatsuyaaaa | D | May 1, 2020, 4:49 p.m. | OK | Java 11 | TESTS | 13 | 187 | 0 | 1900 | |
78768084 | Anonymous | D | May 1, 2020, 10:57 p.m. | OK | Java 11 | TESTS | 13 | 202 | 0 | 1900 | |
78741514 | mphillotry | D | May 1, 2020, 4:57 p.m. | OK | Java 11 | TESTS | 13 | 202 | 0 | 1900 | |
78740577 | idk321 | D | May 1, 2020, 4:54 p.m. | OK | Java 11 | TESTS | 13 | 202 | 0 | 1900 | |
78725267 | derrick20 | D | May 1, 2020, 4:17 p.m. | OK | Java 11 | TESTS | 13 | 202 | 0 | 1900 | |
78726976 | nthistle | D | May 1, 2020, 4:20 p.m. | OK | Java 11 | TESTS | 13 | 202 | 0 | 1900 | |
78753389 | Sandip_Jana | D | May 1, 2020, 6:47 p.m. | OK | Java 8 | TESTS | 13 | 124 | 0 | 1900 | |
78766272 | pranay.agra | D | May 1, 2020, 10:07 p.m. | OK | Java 8 | TESTS | 13 | 124 | 0 | 1900 | |
78765094 | godxpunk | D | May 1, 2020, 9:41 p.m. | OK | Java 8 | TESTS | 13 | 124 | 0 | 1900 | |
78755950 | lzhang | D | May 1, 2020, 7:16 p.m. | OK | Java 8 | TESTS | 13 | 124 | 0 | 1900 | |
78755118 | tsumit023 | D | May 1, 2020, 7:05 p.m. | OK | Java 8 | TESTS | 13 | 124 | 0 | 1900 | |
78750337 | Katushechka | D | May 1, 2020, 6:19 p.m. | OK | Java 8 | TESTS | 13 | 124 | 0 | 1900 | |
78749861 | ImpossibleCode | D | May 1, 2020, 6:15 p.m. | OK | Java 8 | TESTS | 13 | 124 | 0 | 1900 | |
78742727 | ln_nl | D | May 1, 2020, 4:59 p.m. | OK | Java 8 | TESTS | 13 | 124 | 0 | 1900 | |
78736966 | jayliner66 | D | May 1, 2020, 4:45 p.m. | OK | Java 8 | TESTS | 13 | 124 | 0 | 1900 | |
78736412 | Xylenox | D | May 1, 2020, 4:44 p.m. | OK | Java 8 | TESTS | 13 | 124 | 0 | 1900 | |
78712525 | DeadInsideOnTest993 | D | May 1, 2020, 3:50 p.m. | OK | Kotlin | TESTS | 13 | 139 | 0 | 1900 | |
78722854 | koboshi | D | May 1, 2020, 4:11 p.m. | OK | Kotlin | TESTS | 13 | 155 | 102400 | 1900 | |
78729458 | MikasaAckermann | D | May 1, 2020, 4:26 p.m. | OK | Kotlin | TESTS | 13 | 155 | 204800 | 1900 | |
78729399 | abdukodir | D | May 1, 2020, 4:26 p.m. | OK | Kotlin | TESTS | 13 | 186 | 204800 | 1900 | |
78726806 | old_boo | D | May 1, 2020, 4:20 p.m. | OK | Kotlin | TESTS | 13 | 218 | 1228800 | 1900 | |
78751120 | mban259 | D | May 1, 2020, 6:25 p.m. | OK | Mono C# | TESTS | 13 | 62 | 2662400 | 1900 | |
78720193 | hibatibati | D | May 1, 2020, 4:05 p.m. | OK | Mono C# | TESTS | 13 | 62 | 3072000 | 1900 | |
78738712 | Yupiteru | D | May 1, 2020, 4:50 p.m. | OK | Mono C# | TESTS | 13 | 77 | 3481600 | 1900 | |
78751657 | avtoruxadze | D | May 1, 2020, 6:30 p.m. | OK | Mono C# | TESTS | 13 | 77 | 5734400 | 1900 | |
78704384 | camypaper | D | May 1, 2020, 3:34 p.m. | OK | Mono C# | TESTS | 13 | 77 | 35737600 | 1900 | |
78742069 | r57shell | D | May 1, 2020, 4:58 p.m. | OK | MS C++ | TESTS | 13 | 31 | 0 | 1900 | |
78741840 | Volja | D | May 1, 2020, 4:57 p.m. | OK | MS C++ | TESTS | 13 | 31 | 0 | 1900 | |
78713164 | vpike | D | May 1, 2020, 3:51 p.m. | OK | MS C++ 2017 | TESTS | 13 | 31 | 0 | 1900 | |
78735961 | anylonger | D | May 1, 2020, 4:43 p.m. | OK | MS C++ 2017 | TESTS | 13 | 31 | 0 | 1900 | |
78764310 | tarattata1 | D | May 1, 2020, 9:25 p.m. | OK | MS C++ 2017 | TESTS | 13 | 31 | 0 | 1900 | |
78737321 | mihaiI | D | May 1, 2020, 4:46 p.m. | OK | MS C++ 2017 | TESTS | 13 | 46 | 0 | 1900 | |
78755739 | suVrik | D | May 1, 2020, 7:13 p.m. | OK | MS C++ 2017 | TESTS | 13 | 46 | 0 | 1900 | |
78743487 | Gravekper | D | May 1, 2020, 5:01 p.m. | OK | MS C++ 2017 | TESTS | 13 | 46 | 0 | 1900 | |
78743183 | wasd222 | D | May 1, 2020, 5 p.m. | OK | MS C++ 2017 | TESTS | 13 | 46 | 0 | 1900 | |
78732448 | Najmus_Sakib_Rashid | D | May 1, 2020, 4:34 p.m. | OK | MS C++ 2017 | TESTS | 13 | 46 | 0 | 1900 | |
78723098 | ningBr | D | May 1, 2020, 4:12 p.m. | OK | MS C++ 2017 | TESTS | 13 | 46 | 0 | 1900 | |
78717511 | AlexandrBusse | D | May 1, 2020, 4 p.m. | OK | MS C++ 2017 | TESTS | 13 | 46 | 0 | 1900 | |
78760798 | pajenegod | D | May 1, 2020, 8:24 p.m. | OK | PyPy 2 | TESTS | 13 | 171 | 2457600 | 1900 | |
78733386 | satyamcse | D | May 1, 2020, 4:36 p.m. | OK | PyPy 2 | TESTS | 13 | 171 | 2867200 | 1900 | |
78744267 | Bluefish2 | D | May 1, 2020, 5:02 p.m. | OK | PyPy 2 | TESTS | 13 | 202 | 1331200 | 1900 | |
78749780 | mir.panov | D | May 1, 2020, 6:14 p.m. | OK | PyPy 2 | TESTS | 13 | 202 | 2048000 | 1900 | |
78740522 | Athron | D | May 1, 2020, 4:54 p.m. | OK | PyPy 2 | TESTS | 13 | 218 | 2560000 | 1900 | |
78723083 | shehebe | D | May 1, 2020, 4:12 p.m. | OK | PyPy 2 | TESTS | 13 | 373 | 9011200 | 1900 | |
78737074 | ap1008 | D | May 1, 2020, 4:46 p.m. | OK | PyPy 2 | TESTS | 13 | 514 | 4096000 | 1900 | |
78708575 | Jobless22 | D | May 1, 2020, 3:42 p.m. | OK | PyPy 2 | TESTS | 13 | 638 | 9625600 | 1900 | |
78732397 | addammy | D | May 1, 2020, 4:34 p.m. | OK | PyPy 3 | TESTS | 13 | 155 | 3072000 | 1900 | |
78703276 | wilkinson | D | May 1, 2020, 3:32 p.m. | OK | PyPy 3 | TESTS | 13 | 187 | 2969600 | 1900 | |
78714792 | nikeshthapa255 | D | May 1, 2020, 3:54 p.m. | OK | PyPy 3 | TESTS | 13 | 187 | 4505600 | 1900 | |
78726155 | pineriver | D | May 1, 2020, 4:19 p.m. | OK | PyPy 3 | TESTS | 13 | 202 | 4096000 | 1900 | |
78723052 | auouo | D | May 1, 2020, 4:12 p.m. | OK | PyPy 3 | TESTS | 13 | 202 | 5836800 | 1900 | |
78750103 | martin0327 | D | May 1, 2020, 6:17 p.m. | OK | PyPy 3 | TESTS | 13 | 217 | 6348800 | 1900 | |
78759149 | komolakanto | D | May 1, 2020, 7:59 p.m. | OK | PyPy 3 | TESTS | 13 | 217 | 6553600 | 1900 | |
78731309 | asvasil | D | May 1, 2020, 4:31 p.m. | OK | PyPy 3 | TESTS | 13 | 218 | 5324800 | 1900 | |
78728829 | SdahlSean | D | May 1, 2020, 4:25 p.m. | OK | PyPy 3 | TESTS | 13 | 233 | 3993600 | 1900 | |
78752353 | jayantjain100 | D | May 1, 2020, 6:37 p.m. | OK | PyPy 3 | TESTS | 13 | 233 | 4505600 | 1900 | |
78712294 | nwi | D | May 1, 2020, 3:49 p.m. | OK | Python 2 | TESTS | 13 | 202 | 0 | 1900 | |
78734948 | Niccolo19 | D | May 1, 2020, 4:40 p.m. | OK | Python 2 | TESTS | 13 | 218 | 0 | 1900 | |
78714540 | kirill.maiantsev | D | May 1, 2020, 3:54 p.m. | OK | Python 3 | TESTS | 13 | 139 | 307200 | 1900 | |
78760902 | Galkowsky | D | May 1, 2020, 8:25 p.m. | OK | Python 3 | TESTS | 13 | 140 | 307200 | 1900 | |
78750361 | hlavko | D | May 1, 2020, 6:19 p.m. | OK | Python 3 | TESTS | 13 | 140 | 307200 | 1900 | |
78728832 | vmos1999 | D | May 1, 2020, 4:25 p.m. | OK | Python 3 | TESTS | 13 | 140 | 307200 | 1900 | |
78728796 | mkawa2 | D | May 1, 2020, 4:25 p.m. | OK | Python 3 | TESTS | 13 | 140 | 307200 | 1900 | |
78757471 | BlackBear | D | May 1, 2020, 7:36 p.m. | OK | Python 3 | TESTS | 13 | 155 | 307200 | 1900 | |
78752260 | victor_alflen | D | May 1, 2020, 6:36 p.m. | OK | Python 3 | TESTS | 13 | 155 | 307200 | 1900 | |
78751246 | satwik2708 | D | May 1, 2020, 6:26 p.m. | OK | Python 3 | TESTS | 13 | 155 | 307200 | 1900 | |
78740425 | neverlucky | D | May 1, 2020, 4:54 p.m. | OK | Python 3 | TESTS | 13 | 155 | 307200 | 1900 | |
78736766 | squiggly | D | May 1, 2020, 4:45 p.m. | OK | Python 3 | TESTS | 13 | 155 | 307200 | 1900 | |
78714779 | cotton100pc | D | May 1, 2020, 3:54 p.m. | OK | Rust | TESTS | 13 | 31 | 204800 | 1900 | |
78768415 | sansen | D | May 1, 2020, 11:07 p.m. | OK | Rust | TESTS | 13 | 46 | 307200 | 1900 | |
78715975 | zz_kk | D | May 1, 2020, 3:56 p.m. | OK | Rust | TESTS | 13 | 62 | 0 | 1900 |
Back to search problems