Codeforces Round 639 (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
1345 Codeforces Round 639 (Div. 2) FINISHED False 8100 148577111 May 6, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 26901 ) B Card Constructions PROGRAMMING binary search brute force dp math 1100

B'A card pyramid of height 1 is constructed by resting two cards against each other. For h>1 , a card pyramid of height h is constructed by placing a card pyramid of height h-1 onto a base. A base consists of h pyramids of height 1 , and h-1 cards on top. For example, card pyramids of heights 1 , 2 , and 3 look as follows: You start with n cards and build the tallest pyramid that you can. If there are some cards remaining, you build the tallest pyramid possible with the remaining cards. You repeat this process until it is impossible to build another pyramid. In the end, how many pyramids will you have constructed? Each test consists of multiple test cases. The first line contains a single integer t ( 1 <= t <= 1000 ) -- the number of test cases. Next t lines contain descriptions of test cases. Each test case contains a single integer n ( 1 <= n <= 10^9 ) -- the number of cards. It is guaranteed that the sum of n over all test cases does not exceed 10^9 . For each test case output a single integer -- the number of pyramids you will have constructed in the end. In the first test, you construct a pyramid of height 1 with 2 cards. There is 1 card remaining, which is not enough to build a pyramid. In the second test, you build two pyramids, each of height 2 , with no cards remaining. In the third test, you build one pyramid of height 3 , with no cards remaining. In the fourth test, you build one pyramid of height 3 with 9 cards remaining. Then you build a pyramid of height 2 with 2 cards remaining. Then you build a final pyramid of height 1 with no cards remaining. In the fifth test, one card is not enough to build any pyramids. '...

Tutorials

Codeforces Round #639 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
79212780 Gassa B May 6, 2020, 10:38 p.m. OK D TESTS 28 31 4710400 1100
79248105 noob_acmp B May 7, 2020, 8:22 a.m. OK Delphi TESTS 28 31 4300800 1100
79224215 fpc_coder B May 7, 2020, 3:17 a.m. OK FPC TESTS 28 31 3584000 1100
79224794 fpc_coder B May 7, 2020, 3:26 a.m. OK FPC TESTS 28 31 3686400 1100
79177670 PAG B May 6, 2020, 3:19 p.m. OK FPC TESTS 28 31 4198400 1100
79186405 Arteni_Cristi B May 6, 2020, 3:39 p.m. OK FPC TESTS 28 46 3379200 1100
79191048 hfgjdghj B May 6, 2020, 3:51 p.m. OK FPC TESTS 28 46 3379200 1100
79447777 me39 B May 9, 2020, 9:13 a.m. OK GNU C11 TESTS 28 30 3686400 1100
79456251 tjg B May 9, 2020, 11:03 a.m. OK GNU C11 TESTS 28 30 3686400 1100
79185867 prajwal_arya B May 6, 2020, 3:38 p.m. OK GNU C11 TESTS 28 30 3686400 1100
79202036 kitty317ch B May 6, 2020, 4:48 p.m. OK GNU C11 TESTS 28 30 3686400 1100
79442954 Itsmdshahin B May 9, 2020, 8:06 a.m. OK GNU C11 TESTS 28 30 3686400 1100
79223285 xMoosad B May 7, 2020, 3 a.m. OK GNU C11 TESTS 28 30 3788800 1100
79356658 1811015613 B May 8, 2020, 7:58 a.m. OK GNU C11 TESTS 28 31 3686400 1100
79384620 tushar_kabra B May 8, 2020, 2 p.m. OK GNU C11 TESTS 28 31 3686400 1100
79390244 Sampathkumar B May 8, 2020, 3:03 p.m. OK GNU C11 TESTS 28 31 3686400 1100
79343045 fabman_16 B May 8, 2020, 4:30 a.m. OK GNU C11 TESTS 28 31 3686400 1100
79177744 NO.7 B May 6, 2020, 3:19 p.m. OK GNU C++11 TESTS 28 15 3686400 1100
79354938 froggyzhang B May 8, 2020, 7:32 a.m. OK GNU C++11 TESTS 28 15 3891200 1100
79369110 luogu_bot3 B May 8, 2020, 10:44 a.m. OK GNU C++11 TESTS 28 15 5529600 1100
79463464 mrittunjoysarkerakash B May 9, 2020, 12:32 p.m. OK GNU C++11 TESTS 28 30 3686400 1100
79199343 wqm1800 B May 6, 2020, 4:27 p.m. OK GNU C++11 TESTS 28 30 3891200 1100
79244135 xcatf B May 7, 2020, 7:35 a.m. OK GNU C++11 TESTS 28 30 3891200 1100
79269797 ThunderBlizard B May 7, 2020, 12:41 p.m. OK GNU C++11 TESTS 28 30 3891200 1100
79276530 ANDX B May 7, 2020, 1:59 p.m. OK GNU C++11 TESTS 28 30 3891200 1100
79328265 MartinVrbovcan B May 7, 2020, 9:23 p.m. OK GNU C++11 TESTS 28 30 3891200 1100
79395314 Diol B May 8, 2020, 4:01 p.m. OK GNU C++11 TESTS 28 30 3891200 1100
79182881 molprog B May 6, 2020, 3:30 p.m. OK GNU C++14 TESTS 28 30 3686400 1100
79184649 nishitjagetia B May 6, 2020, 3:34 p.m. OK GNU C++14 TESTS 28 30 3686400 1100
79189906 shubham0704 B May 6, 2020, 3:48 p.m. OK GNU C++14 TESTS 28 30 3686400 1100
79194512 komal111 B May 6, 2020, 4:03 p.m. OK GNU C++14 TESTS 28 30 3686400 1100
79197531 terrorghost B May 6, 2020, 4:16 p.m. OK GNU C++14 TESTS 28 30 3686400 1100
79175135 Sharadha99 B May 6, 2020, 3:15 p.m. OK GNU C++14 TESTS 28 30 3686400 1100
79175076 late B May 6, 2020, 3:15 p.m. OK GNU C++14 TESTS 28 30 3686400 1100
79256326 Ankit_chauhan B May 7, 2020, 10:01 a.m. OK GNU C++14 TESTS 28 30 4300800 1100
79180055 crypter_472 B May 6, 2020, 3:25 p.m. OK GNU C++14 TESTS 28 30 4300800 1100
79178774 raj98 B May 6, 2020, 3:22 p.m. OK GNU C++14 TESTS 28 30 4300800 1100
79173103 aryan2507 B May 6, 2020, 3:11 p.m. OK GNU C++17 TESTS 28 30 3686400 1100
79228905 ayush_nishad B May 7, 2020, 4:30 a.m. OK GNU C++17 TESTS 28 30 3686400 1100
79224699 dicfore B May 7, 2020, 3:25 a.m. OK GNU C++17 TESTS 28 30 3686400 1100
79198126 nastya_ka B May 6, 2020, 4:20 p.m. OK GNU C++17 TESTS 28 30 3686400 1100
79187572 i_spidey B May 6, 2020, 3:43 p.m. OK GNU C++17 TESTS 28 30 3686400 1100
79184601 KodiaQ B May 6, 2020, 3:34 p.m. OK GNU C++17 TESTS 28 30 3686400 1100
79177752 hrahul2605 B May 6, 2020, 3:19 p.m. OK GNU C++17 TESTS 28 30 3686400 1100
79173148 Gravity_MaN B May 6, 2020, 3:11 p.m. OK GNU C++17 TESTS 28 30 3686400 1100
79172097 Pranjal_Mangal B May 6, 2020, 3:09 p.m. OK GNU C++17 TESTS 28 30 3686400 1100
79193746 GLAS B May 6, 2020, 4 p.m. OK GNU C++17 TESTS 28 30 3891200 1100
79202294 idah B May 6, 2020, 4:49 p.m. OK GNU C++17 (64) TESTS 28 15 4198400 1100
79221779 dreamoon_love_AA B May 7, 2020, 2:29 a.m. OK GNU C++17 (64) TESTS 28 15 4300800 1100
79215718 ffao B May 6, 2020, 11:54 p.m. OK GNU C++17 (64) TESTS 28 30 4198400 1100
79263878 one_for_all B May 7, 2020, 11:34 a.m. OK GNU C++17 (64) TESTS 28 30 4300800 1100
79360740 achvanov B May 8, 2020, 8:52 a.m. OK GNU C++17 (64) TESTS 28 30 4300800 1100
79402527 Adrenaleontechie B May 8, 2020, 5:35 p.m. OK GNU C++17 (64) TESTS 28 30 4300800 1100
79216293 Racer5x B May 7, 2020, 12:11 a.m. OK GNU C++17 (64) TESTS 28 30 4300800 1100
79206786 N_o_o_b_i_e B May 6, 2020, 8:33 p.m. OK GNU C++17 (64) TESTS 28 30 4300800 1100
79229704 moraprex B May 7, 2020, 4:43 a.m. OK GNU C++17 (64) TESTS 28 30 4300800 1100
79235994 raisinten B May 7, 2020, 6:08 a.m. OK GNU C++17 (64) TESTS 28 30 4300800 1100
79219865 atilol B May 7, 2020, 1:44 a.m. OK Go TESTS 28 46 10649600 1100
79269964 dblokhin B May 7, 2020, 12:43 p.m. OK Go TESTS 28 46 10752000 1100
79175101 Jughead B May 6, 2020, 3:15 p.m. OK Go TESTS 28 46 10752000 1100
79216763 amarjeetanand B May 7, 2020, 12:24 a.m. OK Go TESTS 28 46 10956800 1100
79417947 piyush2894 B May 8, 2020, 9:47 p.m. OK Go TESTS 28 62 10649600 1100
79271496 rajaravan420ashu B May 7, 2020, 1:02 p.m. OK Go TESTS 28 62 11059200 1100
79271381 rajaravan420ashu B May 7, 2020, 1 p.m. OK Go TESTS 28 62 11059200 1100
79177596 pohzipohzi B May 6, 2020, 3:19 p.m. OK Go TESTS 28 155 12697600 1100
79193176 amarjeetanand B May 6, 2020, 3:57 p.m. OK Go TESTS 28 452 16076800 1100
79422602 jlebar B May 9, 2020, 12:28 a.m. OK Haskell TESTS 28 46 13926400 1100
79178717 14visheshjain B May 6, 2020, 3:22 p.m. OK Java 11 TESTS 28 186 23859200 1100
79215381 sajith B May 6, 2020, 11:45 p.m. OK Java 11 TESTS 28 186 23859200 1100
79177563 saikaushik B May 6, 2020, 3:19 p.m. OK Java 11 TESTS 28 186 23961600 1100
79200065 EigenFunk B May 6, 2020, 4:32 p.m. OK Java 11 TESTS 28 187 23859200 1100
79196305 shivamnarware B May 6, 2020, 4:10 p.m. OK Java 11 TESTS 28 187 23859200 1100
79194926 tongtongac01 B May 6, 2020, 4:05 p.m. OK Java 11 TESTS 28 187 23859200 1100
79181228 gargvibhor2012 B May 6, 2020, 3:27 p.m. OK Java 11 TESTS 28 187 23859200 1100
79179315 kgcode B May 6, 2020, 3:24 p.m. OK Java 11 TESTS 28 187 23859200 1100
79385507 bckslsh03 B May 8, 2020, 2:11 p.m. OK Java 11 TESTS 28 187 23961600 1100
79382302 bckslsh03 B May 8, 2020, 1:32 p.m. OK Java 11 TESTS 28 187 23961600 1100
79454731 aditya314 B May 9, 2020, 10:43 a.m. OK Java 8 TESTS 28 109 20480000 1100
79339295 edwardsangam B May 8, 2020, 3:01 a.m. OK Java 8 TESTS 28 109 20480000 1100
79232886 Pranay2516 B May 7, 2020, 5:29 a.m. OK Java 8 TESTS 28 109 20480000 1100
79179489 JatinYadav B May 6, 2020, 3:24 p.m. OK Java 8 TESTS 28 109 20480000 1100
79227120 noobie_code B May 7, 2020, 4:02 a.m. OK Java 8 TESTS 28 109 20582400 1100
79183685 Pheonix1998 B May 6, 2020, 3:32 p.m. OK Java 8 TESTS 28 109 20582400 1100
79191817 Sriram2510 B May 6, 2020, 3:53 p.m. OK Java 8 TESTS 28 124 20377600 1100
79178818 Sadakant B May 6, 2020, 3:22 p.m. OK Java 8 TESTS 28 124 20377600 1100
79171900 rahul.golani09 B May 6, 2020, 3:09 p.m. OK Java 8 TESTS 28 124 20377600 1100
79365260 bluesky111 B May 8, 2020, 9:53 a.m. OK Java 8 TESTS 28 124 20480000 1100
79188257 Luay B May 6, 2020, 3:44 p.m. OK JavaScript TESTS 28 46 6041600 1100
79327413 DeadInsideOnTest993 B May 7, 2020, 9:05 p.m. OK Kotlin TESTS 28 124 20582400 1100
79226429 Spheniscine B May 7, 2020, 3:51 a.m. OK Kotlin TESTS 28 140 22323200 1100
79176667 MaxPylypovych B May 6, 2020, 3:17 p.m. OK Kotlin TESTS 28 155 20787200 1100
79222973 Spheniscine B May 7, 2020, 2:54 a.m. OK Kotlin TESTS 28 155 22425600 1100
79177894 dkozak94 B May 6, 2020, 3:20 p.m. OK Kotlin TESTS 28 156 20787200 1100
79171731 abdukodir B May 6, 2020, 3:08 p.m. OK Kotlin TESTS 28 171 21504000 1100
79184496 MulticolorWorld B May 6, 2020, 3:34 p.m. OK Kotlin TESTS 28 373 20787200 1100
79351043 fr0st B May 8, 2020, 6:38 a.m. OK Mono C# TESTS 28 46 8499200 1100
79259231 avtoruxadze B May 7, 2020, 10:38 a.m. OK Mono C# TESTS 28 61 8601600 1100
79181049 hloya B May 6, 2020, 3:26 p.m. OK Mono C# TESTS 28 62 8396800 1100
79178879 lecho B May 6, 2020, 3:23 p.m. OK Mono C# TESTS 28 62 8396800 1100
79449626 TRR B May 9, 2020, 9:37 a.m. OK Mono C# TESTS 28 62 8396800 1100
79364235 peterc B May 8, 2020, 9:39 a.m. OK Mono C# TESTS 28 62 8396800 1100
79246697 nghiapd B May 7, 2020, 8:05 a.m. OK Mono C# TESTS 28 62 8396800 1100
79238432 treasuryonly B May 7, 2020, 6:34 a.m. OK Mono C# TESTS 28 62 8396800 1100
79188831 ravinem1 B May 6, 2020, 3:46 p.m. OK Mono C# TESTS 28 62 8396800 1100
79185088 PPons B May 6, 2020, 3:36 p.m. OK Mono C# TESTS 28 62 8396800 1100
79272561 vjudge5 B May 7, 2020, 1:14 p.m. OK MS C++ TESTS 28 31 3891200 1100
79172099 Egoryu B May 6, 2020, 3:09 p.m. OK MS C++ TESTS 28 31 3891200 1100
79218973 010302 B May 7, 2020, 1:22 a.m. OK MS C++ TESTS 28 31 3891200 1100
79348727 taxcv B May 8, 2020, 6:06 a.m. OK MS C++ TESTS 28 31 3891200 1100
79272053 vjudge4 B May 7, 2020, 1:08 p.m. OK MS C++ TESTS 28 31 3891200 1100
79175214 theweird B May 6, 2020, 3:15 p.m. OK MS C++ TESTS 28 31 3993600 1100
79257112 parkagnomish2 B May 7, 2020, 10:11 a.m. OK MS C++ TESTS 28 46 3891200 1100
79176467 bqns0125 B May 6, 2020, 3:17 p.m. OK MS C++ TESTS 28 46 4300800 1100
79273434 vjudge5 B May 7, 2020, 1:23 p.m. OK MS C++ TESTS 28 46 4300800 1100
79208599 YTICpoch B May 6, 2020, 9:11 p.m. OK MS C++ TESTS 28 93 5222400 1100
79190153 lizihaoHN B May 6, 2020, 3:49 p.m. OK MS C++ 2017 TESTS 28 31 3686400 1100
79401067 maheshitnitrr B May 8, 2020, 5:14 p.m. OK MS C++ 2017 TESTS 28 31 3686400 1100
79318994 aviral2899 B May 7, 2020, 6:50 p.m. OK MS C++ 2017 TESTS 28 31 3686400 1100
79265312 SPOON796 B May 7, 2020, 11:50 a.m. OK MS C++ 2017 TESTS 28 31 3686400 1100
79244103 dariasaligina B May 7, 2020, 7:34 a.m. OK MS C++ 2017 TESTS 28 31 3686400 1100
79227885 entrupreneur.vivek B May 7, 2020, 4:14 a.m. OK MS C++ 2017 TESTS 28 31 3686400 1100
79220992 Totomaru0812 B May 7, 2020, 2:11 a.m. OK MS C++ 2017 TESTS 28 31 3686400 1100
79196331 ivanshubin B May 6, 2020, 4:10 p.m. OK MS C++ 2017 TESTS 28 31 3686400 1100
79194015 Nikhil_Malleti B May 6, 2020, 4:01 p.m. OK MS C++ 2017 TESTS 28 31 3686400 1100
79189758 Sibestiyan B May 6, 2020, 3:48 p.m. OK MS C++ 2017 TESTS 28 31 3686400 1100
79314598 klond90 B May 7, 2020, 5:51 p.m. OK Node.js TESTS 28 171 13414400 1100
79247578 Utopsia B May 7, 2020, 8:16 a.m. OK Node.js TESTS 28 202 13414400 1100
79235725 cyborgs B May 7, 2020, 6:05 a.m. OK Node.js TESTS 28 202 13414400 1100
79268247 arpit2438735 B May 7, 2020, 12:23 p.m. OK Node.js TESTS 28 202 13516800 1100
79210869 JayOneZ1 B May 6, 2020, 9:57 p.m. OK Node.js TESTS 28 217 13619200 1100
79182898 rsFalse B May 6, 2020, 3:30 p.m. OK Perl TESTS 28 249 4096000 1100
79365549 yumtam B May 8, 2020, 9:57 a.m. OK PyPy 2 TESTS 28 140 24473600 1100
79193294 maheshraju2020 B May 6, 2020, 3:58 p.m. OK PyPy 2 TESTS 28 155 24166400 1100
79180882 jc2jc B May 6, 2020, 3:26 p.m. OK PyPy 2 TESTS 28 170 25088000 1100
79174847 Mukundan314 B May 6, 2020, 3:14 p.m. OK PyPy 2 TESTS 28 171 24883200 1100
79206911 kit.shiron B May 6, 2020, 8:34 p.m. OK PyPy 2 TESTS 28 186 24576000 1100
79180288 prompt3838 B May 6, 2020, 3:25 p.m. OK PyPy 2 TESTS 28 186 25292800 1100
79220271 beethoven97 B May 7, 2020, 1:53 a.m. OK PyPy 2 TESTS 28 186 25395200 1100
79185055 Devraj10 B May 6, 2020, 3:35 p.m. OK PyPy 2 TESTS 28 186 25395200 1100
79244403 alexwice B May 7, 2020, 7:38 a.m. OK PyPy 2 TESTS 28 202 23961600 1100
79173467 alon276 B May 6, 2020, 3:12 p.m. OK PyPy 2 TESTS 28 202 26521600 1100
79171716 TemaSaur B May 6, 2020, 3:08 p.m. OK PyPy 3 TESTS 28 155 22937600 1100
79173378 princebelkovetz B May 6, 2020, 3:12 p.m. OK PyPy 3 TESTS 28 156 22323200 1100
79175060 Achilles221B B May 6, 2020, 3:15 p.m. OK PyPy 3 TESTS 28 171 22425600 1100
79293753 master_cody B May 7, 2020, 2:38 p.m. OK PyPy 3 TESTS 28 171 22630400 1100
79182931 zayaz777 B May 6, 2020, 3:30 p.m. OK PyPy 3 TESTS 28 171 22630400 1100
79172661 suchet0825 B May 6, 2020, 3:10 p.m. OK PyPy 3 TESTS 28 171 22732800 1100
79180133 nikkitikki B May 6, 2020, 3:25 p.m. OK PyPy 3 TESTS 28 171 22937600 1100
79175367 ss7890 B May 6, 2020, 3:15 p.m. OK PyPy 3 TESTS 28 171 23142400 1100
79226715 pedastrian57 B May 7, 2020, 3:55 a.m. OK PyPy 3 TESTS 28 171 23244800 1100
79419293 Chirrut_Imwe B May 8, 2020, 10:28 p.m. OK PyPy 3 TESTS 28 171 23449600 1100
79199669 Himanshu77 B May 6, 2020, 4:29 p.m. OK Python 2 TESTS 28 186 6451200 1100
79187905 Mike10 B May 6, 2020, 3:43 p.m. OK Python 2 TESTS 28 186 6451200 1100
79188980 eugalt B May 6, 2020, 3:46 p.m. OK Python 2 TESTS 28 202 6451200 1100
79191427 jooj B May 6, 2020, 3:52 p.m. OK Python 2 TESTS 28 202 7270400 1100
79183782 elistark B May 6, 2020, 3:32 p.m. OK Python 2 TESTS 28 217 7168000 1100
79177255 rcpc-master B May 6, 2020, 3:19 p.m. OK Python 2 TESTS 28 248 7168000 1100
79244991 s1997 B May 7, 2020, 7:44 a.m. OK Python 2 TESTS 28 311 8192000 1100
79182728 kmd99 B May 6, 2020, 3:30 p.m. OK Python 2 TESTS 28 343 6451200 1100
79469935 coderemite B May 9, 2020, 1:53 p.m. OK Python 3 TESTS 28 109 6656000 1100
79391340 somya19 B May 8, 2020, 3:15 p.m. OK Python 3 TESTS 28 109 6656000 1100
79371712 dhruv.pindawala B May 8, 2020, 11:18 a.m. OK Python 3 TESTS 28 109 6656000 1100
79274324 dineshreddy01 B May 7, 2020, 1:34 p.m. OK Python 3 TESTS 28 109 6656000 1100
79246387 LethalPuppy B May 7, 2020, 8:01 a.m. OK Python 3 TESTS 28 109 6656000 1100
79240790 aviation_0699 B May 7, 2020, 6:58 a.m. OK Python 3 TESTS 28 109 6656000 1100
79238228 HackSlash01 B May 7, 2020, 6:32 a.m. OK Python 3 TESTS 28 109 6656000 1100
79193520 sarveshlohar B May 6, 2020, 3:59 p.m. OK Python 3 TESTS 28 109 6656000 1100
79187666 kevin26 B May 6, 2020, 3:43 p.m. OK Python 3 TESTS 28 109 6656000 1100
79184757 lpshkn B May 6, 2020, 3:35 p.m. OK Python 3 TESTS 28 109 6656000 1100
79208444 utkarsh2102 B May 6, 2020, 9:06 p.m. OK Ruby TESTS 28 109 6451200 1100
79272816 manta1130 B May 7, 2020, 1:16 p.m. OK Rust TESTS 28 46 16384000 1100
79222445 Kaa B May 7, 2020, 2:43 a.m. OK Rust TESTS 28 62 3788800 1100
79188164 rpinoit B May 6, 2020, 3:44 p.m. OK Rust TESTS 28 62 4300800 1100
79175432 maguro_tuna B May 6, 2020, 3:15 p.m. OK Rust TESTS 28 156 5836800 1100
79258991 thomaub B May 7, 2020, 10:35 a.m. OK Rust TESTS 28 436 4096000 1100
79195872 mt0 B May 6, 2020, 4:08 p.m. OK Scala TESTS 28 436 31027200 1100
79213998 IvanDyachenko B May 6, 2020, 11:07 p.m. OK Scala TESTS 28 467 31232000 1100
79452911 Tix B May 9, 2020, 10:19 a.m. OK Scala TESTS 28 467 31334400 1100
79178250 IvanDyachenko B May 6, 2020, 3:20 p.m. OK Scala TESTS 28 482 31232000 1100
79201935 byte B May 6, 2020, 4:47 p.m. OK Scala TESTS 28 514 39424000 1100

remove filters

Back to search problems