Codeforces Round 894 (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
1862 Codeforces Round 894 (Div. 3) FINISHED False 8100 44292263 Aug. 24, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 17777 ) D Ice Cream Balls PROGRAMMING binary search combinatorics constructive algorithms math

B'Tema decided to improve his ice cream making skills. He has already learned how to make ice cream in a cone using exactly two balls. Before his ice cream obsession, Tema was interested in mathematics. Therefore, he is curious about the minimum number of balls he needs to have in order to make exactly n different types of ice cream. There are plenty possible ice cream flavours: 1, 2, 3, ... . Tema can make two-balls ice cream with any flavours (probably the same). Two ice creams are considered different if their sets of ball flavours are different. For example, {1, 2 } = {2, 1 } , but {1, 1 } neq {1, 2 } . For example, having the following ice cream balls: {1, 1, 2 } , Tema can make only two types of ice cream: {1, 1 } and {1, 2 } . Note, that Tema do not need to make all the ice cream cones at the same time. This means that he making ice cream cones independently. Also in order to make a following cone {x, x } for some x , Tema needs at least 2 balls of type x . Help Tema answer this question. It can be shown that answer always exist. Each test consists of multiple test cases. The first line of input contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. Then follows the description of the test cases. The first line of each test case contains a single integer n ( 1 <= n <= 10^{18} ) -- the number of ice cream types that Tema wants to make. For each test case, output a single integer -- the minimum number of balls Tema needs to buy. In the first sample, it is enough to have following balls types: {1, 1 } . Note, that set {1 } if not enough since we need at least 2 balls of a type 1 in order to make such cone {1, 1 } . In the second sample, it is not possible to make it with 2 balls, but it can be done with these balls: {1, 2, 3 } . In the third sample, {1, 2, 3, 4 } is optimal answer, so w'...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
220450548 mban259 D Aug. 26, 2023, 1:56 a.m. OK C# 10 TESTS 17 62 1228800
220420131 kellendros95 D Aug. 25, 2023, 5:55 p.m. OK C# 10 TESTS 17 108 921600
220465042 daydreamer03 D Aug. 26, 2023, 5:49 a.m. OK GNU C++14 TESTS 17 15 0
220450709 AhmedAlkingHamdy D Aug. 26, 2023, 1:59 a.m. OK GNU C++14 TESTS 17 15 0
220444792 luogu_bot2 D Aug. 25, 2023, 11:40 p.m. OK GNU C++14 TESTS 17 15 0
220441546 Ridu1 D Aug. 25, 2023, 10:22 p.m. OK GNU C++14 TESTS 17 15 0
220422013 raj_gautam D Aug. 25, 2023, 6:10 p.m. OK GNU C++14 TESTS 17 15 0
220413201 zq03s D Aug. 25, 2023, 5:04 p.m. OK GNU C++14 TESTS 17 15 0
220407109 Rising_Sun D Aug. 25, 2023, 4:18 p.m. OK GNU C++14 TESTS 17 15 0
220403257 omeganot D Aug. 25, 2023, 3:50 p.m. OK GNU C++14 TESTS 17 15 0
220390762 cqbzzhy D Aug. 25, 2023, 2:47 p.m. OK GNU C++14 TESTS 17 15 0
220378797 zhangtutu D Aug. 25, 2023, 1:01 p.m. OK GNU C++14 TESTS 17 15 0
220462465 yysxy D Aug. 26, 2023, 5:19 a.m. OK GNU C++17 TESTS 17 15 0
220461992 NOCTURNAL054 D Aug. 26, 2023, 5:13 a.m. OK GNU C++17 TESTS 17 15 0
220460192 Tamim009 D Aug. 26, 2023, 4:48 a.m. OK GNU C++17 TESTS 17 15 0
220460133 suppakrit2006 D Aug. 26, 2023, 4:47 a.m. OK GNU C++17 TESTS 17 15 0
220454993 didwhddks D Aug. 26, 2023, 3:20 a.m. OK GNU C++17 TESTS 17 15 0
220451958 kaiichen D Aug. 26, 2023, 2:24 a.m. OK GNU C++17 TESTS 17 15 0
220451678 paoxiaomo D Aug. 26, 2023, 2:18 a.m. OK GNU C++17 TESTS 17 15 0
220448431 HotStepBroz D Aug. 26, 2023, 1:11 a.m. OK GNU C++17 TESTS 17 15 0
220446356 deep_1704 D Aug. 26, 2023, 12:21 a.m. OK GNU C++17 TESTS 17 15 0
220440542 dreameater69 D Aug. 25, 2023, 10:01 p.m. OK GNU C++17 TESTS 17 15 0
220464466 Followall D Aug. 26, 2023, 5:42 a.m. OK GNU C++17 (64) TESTS 17 15 0
220464099 murugank0204 D Aug. 26, 2023, 5:38 a.m. OK GNU C++17 (64) TESTS 17 15 0
220461267 Sagittarius_A_star D Aug. 26, 2023, 5:03 a.m. OK GNU C++17 (64) TESTS 17 15 0
220457667 JohanWOW D Aug. 26, 2023, 4:05 a.m. OK GNU C++17 (64) TESTS 17 15 0
220456956 New_beginner D Aug. 26, 2023, 3:55 a.m. OK GNU C++17 (64) TESTS 17 15 0
220453617 AhmedAlkingHamdy D Aug. 26, 2023, 2:55 a.m. OK GNU C++17 (64) TESTS 17 15 0
220439889 whatisthis132 D Aug. 25, 2023, 9:47 p.m. OK GNU C++17 (64) TESTS 17 15 0
220438574 HelmOptimum D Aug. 25, 2023, 9:23 p.m. OK GNU C++17 (64) TESTS 17 15 0
220430522 OminuseNebula D Aug. 25, 2023, 7:34 p.m. OK GNU C++17 (64) TESTS 17 15 0
220427968 juancs D Aug. 25, 2023, 7:05 p.m. OK GNU C++17 (64) TESTS 17 15 0
220439148 pink_27 D Aug. 25, 2023, 9:33 p.m. OK GNU C++20 (64) TESTS 17 0 0
220417698 Abdulrahman_Gouda D Aug. 25, 2023, 5:37 p.m. OK GNU C++20 (64) TESTS 17 0 0
220439858 delwar_03_ D Aug. 25, 2023, 9:46 p.m. OK GNU C++20 (64) TESTS 17 0 4812800
220466150 yxyxyx D Aug. 26, 2023, 6 a.m. OK GNU C++20 (64) TESTS 17 15 0
220465506 YMXL D Aug. 26, 2023, 5:54 a.m. OK GNU C++20 (64) TESTS 17 15 0
220464441 lcdanya. D Aug. 26, 2023, 5:42 a.m. OK GNU C++20 (64) TESTS 17 15 0
220464140 jetz D Aug. 26, 2023, 5:39 a.m. OK GNU C++20 (64) TESTS 17 15 0
220462422 Mamalesh D Aug. 26, 2023, 5:18 a.m. OK GNU C++20 (64) TESTS 17 15 0
220461645 kotharirahil9 D Aug. 26, 2023, 5:08 a.m. OK GNU C++20 (64) TESTS 17 15 0
220461184 hyyw051228 D Aug. 26, 2023, 5:02 a.m. OK GNU C++20 (64) TESTS 17 15 0
220446758 iamavalon D Aug. 26, 2023, 12:31 a.m. OK Java 11 TESTS 17 186 0
220449763 profchi D Aug. 26, 2023, 1:39 a.m. OK Java 11 TESTS 17 187 0
220376164 mohamedhassan_c D Aug. 25, 2023, 12:42 p.m. OK Java 11 TESTS 17 233 7065600
220361155 black_devil_9552 D Aug. 25, 2023, 10:32 a.m. OK Java 11 TESTS 17 249 0
220360058 TJ_Codes D Aug. 25, 2023, 10:10 a.m. OK Java 11 TESTS 17 280 0
220362004 jooncco D Aug. 25, 2023, 10:44 a.m. OK Java 11 TESTS 17 295 0
220371059 TJ_Codes D Aug. 25, 2023, 12:02 p.m. OK Java 11 TESTS 17 296 0
220359252 d2s2 D Aug. 25, 2023, 9:55 a.m. OK Java 17 TESTS 17 187 307200
220362447 RahulAhuja2901 D Aug. 25, 2023, 10:49 a.m. OK Java 17 TESTS 17 202 512000
220371836 Safawt D Aug. 25, 2023, 12:08 p.m. OK Java 17 TESTS 17 218 819200
220414160 aris_sk D Aug. 25, 2023, 5:10 p.m. OK Java 17 TESTS 17 233 204800
220351846 Legend... D Aug. 25, 2023, 7:45 a.m. OK Java 17 TESTS 17 233 614400
220364037 Extradict D Aug. 25, 2023, 11:02 a.m. OK Java 17 TESTS 17 264 409600
220440598 imvivekthakur D Aug. 25, 2023, 10:02 p.m. OK Java 17 TESTS 17 265 614400
220436692 Akash_Sardar D Aug. 25, 2023, 8:54 p.m. OK Java 17 TESTS 17 280 614400
220417031 palak_05 D Aug. 25, 2023, 5:32 p.m. OK Java 17 TESTS 17 295 716800
220361363 tbs-jyy D Aug. 25, 2023, 10:36 a.m. OK Java 17 TESTS 17 296 512000
220355575 Danger_Don D Aug. 25, 2023, 8:52 a.m. OK Java 8 TESTS 17 139 0
220350879 Nanthakumar06 D Aug. 25, 2023, 7:33 a.m. OK Java 8 TESTS 17 140 0
220456753 harry1995 D Aug. 26, 2023, 3:51 a.m. OK Java 8 TESTS 17 171 0
220369343 QianCCC D Aug. 25, 2023, 11:48 a.m. OK Java 8 TESTS 17 187 0
220370745 depurador_ik D Aug. 25, 2023, 11:59 a.m. OK Java 8 TESTS 17 217 12492800
220409085 vinaysk8803 D Aug. 25, 2023, 4:32 p.m. OK Java 8 TESTS 17 233 0
220428257 sid_81 D Aug. 25, 2023, 7:08 p.m. OK Java 8 TESTS 17 249 0
220370249 SecondThreadUltimate D Aug. 25, 2023, 11:55 a.m. OK Java 8 TESTS 17 249 0
220352023 Antwerp2004 D Aug. 25, 2023, 7:48 a.m. OK MS C++ 2017 TESTS 17 62 0
220440806 novoselkosta D Aug. 25, 2023, 10:06 p.m. OK MS C++ 2017 TESTS 17 77 0
220375766 Ravitosh D Aug. 25, 2023, 12:39 p.m. OK MS C++ 2017 TESTS 17 77 0
220354556 mounikakasa72 D Aug. 25, 2023, 8:35 a.m. OK MS C++ 2017 TESTS 17 77 0
220354454 1434314294 D Aug. 25, 2023, 8:33 a.m. OK MS C++ 2017 TESTS 17 77 1638400
220465111 adithyag1 D Aug. 26, 2023, 5:50 a.m. OK MS C++ 2017 TESTS 17 93 0
220369139 Turtleeee D Aug. 25, 2023, 11:46 a.m. OK PyPy 3 TESTS 17 187 4403200
220408687 noobmaster2002 D Aug. 25, 2023, 4:29 p.m. OK PyPy 3 TESTS 17 280 9216000
220412849 momenelmesady4803 D Aug. 25, 2023, 5:01 p.m. OK PyPy 3 TESTS 17 343 7987200
220417155 Bleeding_steel D Aug. 25, 2023, 5:33 p.m. OK PyPy 3 TESTS 17 639 5324800
220415292 l0stempl3 D Aug. 25, 2023, 5:19 p.m. OK PyPy 3-64 TESTS 17 62 2662400
220354041 Turtleeee D Aug. 25, 2023, 8:26 a.m. OK PyPy 3-64 TESTS 17 93 5222400
220415295 Kladrr D Aug. 25, 2023, 5:19 p.m. OK PyPy 3-64 TESTS 17 93 5939200
220434938 prietukani D Aug. 25, 2023, 8:29 p.m. OK PyPy 3-64 TESTS 17 93 7065600
220442594 adamjamil D Aug. 25, 2023, 10:46 p.m. OK PyPy 3-64 TESTS 17 108 5529600
220373183 zechri D Aug. 25, 2023, 12:19 p.m. OK PyPy 3-64 TESTS 17 108 5632000
220369195 MistaFlash D Aug. 25, 2023, 11:47 a.m. OK PyPy 3-64 TESTS 17 109 5632000
220372529 Super_Misha D Aug. 25, 2023, 12:13 p.m. OK PyPy 3-64 TESTS 17 109 7270400
220436583 JerryX D Aug. 25, 2023, 8:52 p.m. OK PyPy 3-64 TESTS 17 124 5324800
220463590 Ana_naS D Aug. 26, 2023, 5:33 a.m. OK PyPy 3-64 TESTS 17 124 5939200
220410857 kuznetsov.andrey D Aug. 25, 2023, 4:45 p.m. OK Python 3 TESTS 17 46 819200
220351171 ProCoder12 D Aug. 25, 2023, 7:36 a.m. OK Python 3 TESTS 17 61 102400
220415525 Ankit2406 D Aug. 25, 2023, 5:21 p.m. OK Python 3 TESTS 17 93 0
220454873 prakhars3010 D Aug. 26, 2023, 3:18 a.m. OK Python 3 TESTS 17 108 0
220412795 smam-mahdi D Aug. 25, 2023, 5:01 p.m. OK Python 3 TESTS 17 109 0
220376410 VerEfr D Aug. 25, 2023, 12:44 p.m. OK Python 3 TESTS 17 109 0
220419429 SaulGoodman1960 D Aug. 25, 2023, 5:50 p.m. OK Python 3 TESTS 17 124 0
220415707 vaibhav_92002 D Aug. 25, 2023, 5:22 p.m. OK Python 3 TESTS 17 124 0
220359076 AnastasiaTrynina6E D Aug. 25, 2023, 9:51 a.m. OK Python 3 TESTS 17 140 0
220436528 maciejgusta D Aug. 25, 2023, 8:51 p.m. OK Python 3 TESTS 17 202 0

remove filters

Back to search problems