Codeforces Round 491 (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
991 Codeforces Round 491 (Div. 2) FINISHED False 7200 207757524 June 23, 2018, 3:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 10683 ) C Candies PROGRAMMING binary search implementation 1500

B"After passing a test, Vasya got himself a box of n candies. He decided to eat an equal amount of candies each morning until there are no more candies. However, Petya also noticed the box and decided to get some candies for himself. This means the process of eating candies is the following: in the beginning Vasya chooses a single integer k , same for all days. After that, in the morning he eats k candies from the box (if there are less than k candies in the box, he eats them all), then in the evening Petya eats 10 % of the candies remaining in the box. If there are still candies left in the box, the process repeats -- next day Vasya eats k candies again, and Petya -- 10 % of the candies left in a box, and so on. If the amount of candies in the box is not divisible by 10 , Petya rounds the amount he takes from the box down. For example, if there were 97 candies in the box, Petya would eat only 9 of them. In particular, if there are less than 10 candies in a box, Petya won't eat any at all. Your task is to find out the minimal amount of k that can be chosen by Vasya so that he would eat at least half of the n candies he initially got. Note that the number k must be integer. The first line contains a single integer n ( 1 <= q n <= q 10^{18} ) -- the initial amount of candies in the box. Output a single integer -- the minimal amount of k that would allow Vasya to eat at least half of candies he got. In the sample, the amount of candies, with k=3 , would change in the following way (Vasya eats first): 68 to 65 to 59 to 56 to 51 to 48 to 44 to 41 to 37 to 34 to 31 to 28 to 26 to 23 to 21 to 18 to 17 to 14 to 13 to 10 to 9 to 6 to 6 to 3 to 3 to 0 . In total, Vasya would eat 39 candies, while Petya -- 29 . "...

Tutorials

60181

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
40224155 vjudge4 C July 12, 2018, 8:03 a.m. OK Clang++17 Diagnostics TESTS 69 46 0 1500
49378585 vjudge4 C Feb. 2, 2019, 10:18 p.m. OK Clang++17 Diagnostics TESTS 69 46 0 1500
59954806 sandeepchary97 C Sept. 3, 2019, 3:45 p.m. OK Clang++17 Diagnostics TESTS 69 62 0 1500
39579584 rr_ C June 23, 2018, 7:32 p.m. OK D TESTS 69 31 0 1500
39583063 pchvirov C June 23, 2018, 9:31 p.m. OK Delphi TESTS 69 31 102400 1500
44342537 chaorenhaha C Oct. 15, 2018, 4:53 a.m. OK FPC TESTS 69 31 0 1500
65315108 tchr C Nov. 18, 2019, 4:57 p.m. OK FPC TESTS 69 31 0 1500
39700150 Bear.-. C June 27, 2018, 11:41 a.m. OK FPC TESTS 69 31 0 1500
39700113 Bear.-. C June 27, 2018, 11:40 a.m. OK FPC TESTS 69 31 0 1500
39570137 Ulanov_Victor C June 23, 2018, 4:52 p.m. OK FPC TESTS 69 31 0 1500
39567224 PAG C June 23, 2018, 4:37 p.m. OK FPC TESTS 69 31 0 1500
54167997 chaorenhaha C May 15, 2019, 9:34 a.m. OK FPC TESTS 69 31 0 1500
47819296 HVP.exe C Jan. 1, 2019, 4:34 p.m. OK FPC TESTS 69 31 102400 1500
45991326 Aschente C Nov. 20, 2018, 10:03 a.m. OK FPC TESTS 69 31 102400 1500
39597658 libra9z C June 24, 2018, 9:51 a.m. OK GNU C TESTS 69 31 0 1500
39580172 0-O C June 23, 2018, 7:44 p.m. OK GNU C TESTS 69 31 0 1500
39572528 tcantr C June 23, 2018, 5:05 p.m. OK GNU C TESTS 69 31 0 1500
39570540 forlfs C June 23, 2018, 4:54 p.m. OK GNU C TESTS 69 31 0 1500
39570349 1574354102 C June 23, 2018, 4:53 p.m. OK GNU C TESTS 69 31 0 1500
39639824 psc233 C June 25, 2018, 6:09 a.m. OK GNU C++ TESTS 69 15 0 1500
40696350 luogu_bot3 C July 24, 2018, 8:13 a.m. OK GNU C++ TESTS 69 30 0 1500
39739263 shubhampaliwal C June 28, 2018, 10:08 a.m. OK GNU C++ TESTS 69 30 0 1500
39729262 samarsaeedq22 C June 27, 2018, 11:26 p.m. OK GNU C++ TESTS 69 30 0 1500
39703067 RobertZhao1101 C June 27, 2018, 1:42 p.m. OK GNU C++ TESTS 69 30 0 1500
39702718 C-- C June 27, 2018, 1:27 p.m. OK GNU C++ TESTS 69 30 0 1500
39699025 aditya787244poddar C June 27, 2018, 10:52 a.m. OK GNU C++ TESTS 69 30 0 1500
39681837 kinder C June 26, 2018, 5:05 p.m. OK GNU C++ TESTS 69 30 0 1500
39650266 bhardwaj340 C June 25, 2018, 1:06 p.m. OK GNU C++ TESTS 69 30 0 1500
39647337 nuba96 C June 25, 2018, 11:09 a.m. OK GNU C++ TESTS 69 30 0 1500
39592688 psp.643a C June 24, 2018, 6:55 a.m. OK GNU C11 TESTS 69 30 0 1500
39638878 risu007 C June 25, 2018, 5:25 a.m. OK GNU C11 TESTS 69 31 0 1500
49136989 vjudge5 C Jan. 29, 2019, 8:12 a.m. OK GNU C11 TESTS 69 31 0 1500
65484061 vjudge4 C Nov. 21, 2019, 12:39 p.m. OK GNU C11 TESTS 69 31 0 1500
65590428 vjudge2 C Nov. 23, 2019, 1:56 p.m. OK GNU C11 TESTS 69 31 0 1500
65691716 vjudge4 C Nov. 25, 2019, 5:24 a.m. OK GNU C11 TESTS 69 31 0 1500
65617608 vjudge2 C Nov. 24, 2019, 4:41 a.m. OK GNU C11 TESTS 69 46 0 1500
39588457 arpit115 C June 24, 2018, 3:50 a.m. OK GNU C++11 TESTS 69 15 0 1500
39647817 lazarS157 C June 25, 2018, 11:30 a.m. OK GNU C++11 TESTS 69 15 0 1500
39636717 yjx20164391 C June 25, 2018, 3:08 a.m. OK GNU C++11 TESTS 69 15 0 1500
39605914 tasneem.sharaf97 C June 24, 2018, 2:49 p.m. OK GNU C++11 TESTS 69 15 0 1500
39601831 Renaats C June 24, 2018, 12:24 p.m. OK GNU C++11 TESTS 69 15 0 1500
39589619 bobob C June 24, 2018, 4:49 a.m. OK GNU C++11 TESTS 69 15 0 1500
39728268 stEvo C June 27, 2018, 9:56 p.m. OK GNU C++11 TESTS 69 30 0 1500
39768677 XG20 C June 29, 2018, 12:56 p.m. OK GNU C++11 TESTS 69 30 0 1500
54077208 divyang C May 13, 2019, 9:21 p.m. OK GNU C++11 TESTS 69 30 0 1500
64295389 vjudge3 C Nov. 5, 2019, 8:27 a.m. OK GNU C++11 TESTS 69 30 0 1500
55833229 zegatron C June 20, 2019, 2:09 p.m. OK GNU C++14 TESTS 69 15 0 1500
58528775 myas C Aug. 10, 2019, 8:28 a.m. OK GNU C++14 TESTS 69 15 0 1500
39684163 ArnavGarg C June 26, 2018, 6:55 p.m. OK GNU C++14 TESTS 69 15 0 1500
39681811 chamanag C June 26, 2018, 5:04 p.m. OK GNU C++14 TESTS 69 15 0 1500
39673524 Ehsan_sShuvo C June 26, 2018, 11:09 a.m. OK GNU C++14 TESTS 69 15 0 1500
39702225 gi_sha C June 27, 2018, 1:05 p.m. OK GNU C++14 TESTS 69 15 0 1500
39702354 gaurav007_ C June 27, 2018, 1:10 p.m. OK GNU C++14 TESTS 69 15 0 1500
39700304 ShockwaveXZ C June 27, 2018, 11:48 a.m. OK GNU C++14 TESTS 69 15 0 1500
39694915 madhav_1999 C June 27, 2018, 7:58 a.m. OK GNU C++14 TESTS 69 15 0 1500
42153427 kulukamal bro_techies C Aug. 27, 2018, 1:23 p.m. OK GNU C++14 TESTS 69 15 0 1500
39604903 AlexPashaYura C June 24, 2018, 2:08 p.m. OK GNU C++17 TESTS 69 15 0 1500
59931802 JinerGenkai C Sept. 3, 2019, 7:31 a.m. OK GNU C++17 TESTS 69 15 0 1500
52573733 AlmoezAli C April 10, 2019, 3:22 p.m. OK GNU C++17 TESTS 69 15 0 1500
39885306 deeptiagg16 C July 3, 2018, 6:40 a.m. OK GNU C++17 TESTS 69 15 0 1500
39694475 Arafatistic C June 27, 2018, 7:40 a.m. OK GNU C++17 TESTS 69 15 0 1500
39692761 joydip1234 C June 27, 2018, 6:25 a.m. OK GNU C++17 TESTS 69 15 0 1500
39655688 prakharmath C June 25, 2018, 4:57 p.m. OK GNU C++17 TESTS 69 15 0 1500
39594134 vjudge1 C June 24, 2018, 7:45 a.m. OK GNU C++17 TESTS 69 15 0 1500
39592178 AStanev C June 24, 2018, 6:38 a.m. OK GNU C++17 TESTS 69 15 0 1500
39590354 bstrauch24 C June 24, 2018, 5:23 a.m. OK GNU C++17 TESTS 69 15 0 1500
53083929 windy C April 21, 2019, 8:04 a.m. OK Go TESTS 69 46 0 1500
39576067 brainddump C June 23, 2018, 5:26 p.m. OK Haskell TESTS 69 15 0 1500
51915787 MaxHeap C March 27, 2019, 9:33 p.m. OK Java 8 TESTS 69 109 0 1500
66614552 ijxjdjd C Dec. 11, 2019, 2:24 a.m. OK Java 8 TESTS 69 109 0 1500
63409481 goyalnikhil064 C Oct. 25, 2019, 10:44 p.m. OK Java 8 TESTS 69 109 0 1500
58464911 dehydratedwater C Aug. 8, 2019, 6:48 p.m. OK Java 8 TESTS 69 109 0 1500
55861201 o.radwan C June 21, 2019, 9:38 a.m. OK Java 8 TESTS 69 109 0 1500
55742194 mdazmat9 C June 19, 2019, 8:05 a.m. OK Java 8 TESTS 69 109 0 1500
55239406 zmurzagaliev C June 7, 2019, 10:05 a.m. OK Java 8 TESTS 69 109 0 1500
54816697 hasan5788 C May 29, 2019, 8:34 p.m. OK Java 8 TESTS 69 109 0 1500
51446667 AWCXV C March 18, 2019, 12:49 p.m. OK Java 8 TESTS 69 109 0 1500
50723932 RasMalai C March 3, 2019, 9:12 a.m. OK Java 8 TESTS 69 109 0 1500
39645118 SerVB C June 25, 2018, 9:40 a.m. OK Kotlin TESTS 69 140 0 1500
39645202 SerVB C June 25, 2018, 9:42 a.m. OK Kotlin TESTS 69 140 0 1500
39575099 fadimko C June 23, 2018, 5:20 p.m. OK Kotlin TESTS 69 155 0 1500
52520815 aleks180700 C April 9, 2019, 8:34 a.m. OK Mono C# TESTS 69 46 0 1500
51381434 nemars C March 16, 2019, 4:28 p.m. OK Mono C# TESTS 69 62 0 1500
57773451 walticotc C July 26, 2019, 2:14 a.m. OK Mono C# TESTS 69 62 0 1500
55670053 og.kostya C June 17, 2019, 6:59 a.m. OK Mono C# TESTS 69 62 0 1500
41024941 kryspinow C July 31, 2018, 2:23 p.m. OK Mono C# TESTS 69 62 0 1500
39591344 MenOfPassion C June 24, 2018, 6:06 a.m. OK MS C++ TESTS 69 30 0 1500
39590517 Alecks C June 24, 2018, 5:31 a.m. OK MS C++ TESTS 69 30 0 1500
40647236 vjudge5 C July 22, 2018, 5:15 p.m. OK MS C++ TESTS 69 30 0 1500
39650045 pericle C June 25, 2018, 12:57 p.m. OK MS C++ TESTS 69 30 0 1500
66266094 vjudge3 C Dec. 4, 2019, 10:32 a.m. OK MS C++ TESTS 69 31 0 1500
66037713 vjudge5 C Nov. 30, 2019, 12:24 p.m. OK MS C++ TESTS 69 31 0 1500
66141032 vjudge4 C Dec. 1, 2019, 2:24 p.m. OK MS C++ TESTS 69 31 0 1500
65936078 vjudge2 C Nov. 29, 2019, 2:15 a.m. OK MS C++ TESTS 69 31 0 1500
66459245 vjudge2 C Dec. 7, 2019, 2:14 p.m. OK MS C++ TESTS 69 31 0 1500
66139207 vjudge5 C Dec. 1, 2019, 1:38 p.m. OK MS C++ TESTS 69 31 0 1500
57707247 thy0602 C July 24, 2019, 8:48 p.m. OK MS C++ 2017 TESTS 69 30 0 1500
65583282 vjudge3 C Nov. 23, 2019, 11:39 a.m. OK MS C++ 2017 TESTS 69 31 0 1500
65890014 vjudge4 C Nov. 28, 2019, 2:41 a.m. OK MS C++ 2017 TESTS 69 31 0 1500
65878333 vjudge2 C Nov. 27, 2019, 5:53 p.m. OK MS C++ 2017 TESTS 69 31 0 1500
65622994 vjudge3 C Nov. 24, 2019, 6:54 a.m. OK MS C++ 2017 TESTS 69 31 0 1500
65597940 vjudge5 C Nov. 23, 2019, 4:41 p.m. OK MS C++ 2017 TESTS 69 31 0 1500
65512508 vjudge1 C Nov. 22, 2019, 4:59 a.m. OK MS C++ 2017 TESTS 69 31 0 1500
64863776 yuanyuan2048 C Nov. 14, 2019, 4:54 a.m. OK MS C++ 2017 TESTS 69 31 0 1500
58239501 washedbutnotdriedd C Aug. 3, 2019, 10:34 p.m. OK MS C++ 2017 TESTS 69 31 0 1500
58158418 IbraheemJanajreh C Aug. 2, 2019, 6:34 a.m. OK MS C++ 2017 TESTS 69 31 0 1500
39947185 secondwtq C July 4, 2018, 8:05 a.m. OK Ocaml TESTS 69 31 0 1500
39703029 nealzane C June 27, 2018, 1:41 p.m. OK PyPy 2 TESTS 69 93 0 1500
40547478 EON_KID C July 19, 2018, 12:34 p.m. OK PyPy 2 TESTS 69 124 0 1500
39598141 anshuman16423 C June 24, 2018, 10:08 a.m. OK PyPy 2 TESTS 69 139 0 1500
39571116 rkstalker C June 23, 2018, 4:57 p.m. OK PyPy 2 TESTS 69 139 307200 1500
39580016 pa.n.ik C June 23, 2018, 7:40 p.m. OK PyPy 2 TESTS 69 139 2560000 1500
40707917 Onesh0t C July 24, 2018, 2:13 p.m. OK PyPy 2 TESTS 69 140 102400 1500
40520883 akshay125 C July 18, 2018, 4:10 p.m. OK PyPy 2 TESTS 69 156 102400 1500
39782181 BurntArgonPancakes C June 29, 2018, 8:57 p.m. OK PyPy 2 TESTS 69 280 8601600 1500
51231981 morriship C March 12, 2019, 4:44 p.m. OK PyPy 3 TESTS 69 124 0 1500
39733899 homoeconomicus C June 28, 2018, 6:05 a.m. OK PyPy 3 TESTS 69 124 0 1500
39597684 shmabulock C June 24, 2018, 9:51 a.m. OK PyPy 3 TESTS 69 124 0 1500
39581410 wadissimo C June 23, 2018, 8:20 p.m. OK PyPy 3 TESTS 69 139 0 1500
68677584 jansons C Jan. 12, 2020, 7:27 p.m. OK PyPy 3 TESTS 69 140 0 1500
63701073 kaif_7 C Oct. 29, 2019, 7:21 a.m. OK PyPy 3 TESTS 69 140 0 1500
50535863 nethish C Feb. 26, 2019, 3:40 p.m. OK PyPy 3 TESTS 69 140 0 1500
47805325 Guendabiaani C Jan. 1, 2019, 6:35 a.m. OK PyPy 3 TESTS 69 140 0 1500
47766002 nowyyz C Dec. 30, 2018, 5:31 p.m. OK PyPy 3 TESTS 69 140 0 1500
41227334 Captainum C Aug. 4, 2018, 9:14 p.m. OK PyPy 3 TESTS 69 140 0 1500
39734039 kakkarotssj C June 28, 2018, 6:12 a.m. OK Python 2 TESTS 69 108 0 1500
39733962 kakkarotssj C June 28, 2018, 6:09 a.m. OK Python 2 TESTS 69 108 0 1500
39629616 SoSooding C June 24, 2018, 6:59 p.m. OK Python 2 TESTS 69 108 0 1500
39703100 nealzane C June 27, 2018, 1:44 p.m. OK Python 2 TESTS 69 109 0 1500
39643714 Ali_Pi C June 25, 2018, 8:48 a.m. OK Python 2 TESTS 69 109 0 1500
39607733 Sabareeshk C June 24, 2018, 4:10 p.m. OK Python 2 TESTS 69 109 0 1500
39599626 alankrit_singh_1 C June 24, 2018, 11 a.m. OK Python 2 TESTS 69 109 0 1500
39596831 _____ C June 24, 2018, 9:21 a.m. OK Python 2 TESTS 69 109 0 1500
39592457 pavankatta C June 24, 2018, 6:47 a.m. OK Python 2 TESTS 69 109 0 1500
39587805 Patiala_Peg C June 24, 2018, 3:19 a.m. OK Python 2 TESTS 69 109 0 1500
39733439 the_white_devil C June 28, 2018, 5:39 a.m. OK Python 3 TESTS 69 78 0 1500
39603224 USYD_Yemengchen C June 24, 2018, 1:01 p.m. OK Python 3 TESTS 69 78 0 1500
39592812 Yee_172 C June 24, 2018, 6:58 a.m. OK Python 3 TESTS 69 78 0 1500
39592731 strint C June 24, 2018, 6:56 a.m. OK Python 3 TESTS 69 78 0 1500
39583426 Pedantic C June 23, 2018, 9:54 p.m. OK Python 3 TESTS 69 78 0 1500
39683617 neeleshsinha C June 26, 2018, 6:26 p.m. OK Python 3 TESTS 69 92 0 1500
39632465 MajAK C June 24, 2018, 9:22 p.m. OK Python 3 TESTS 69 92 0 1500
39587321 darth_coder C June 24, 2018, 2:52 a.m. OK Python 3 TESTS 69 92 0 1500
39753334 orailly C June 28, 2018, 9 p.m. OK Python 3 TESTS 69 93 0 1500
39687506 MystikNinja C June 26, 2018, 11:21 p.m. OK Python 3 TESTS 69 93 0 1500
41669345 betrue12 C Aug. 17, 2018, 3:22 a.m. OK Ruby TESTS 69 62 204800 1500
39579927 AnandVeeramani C June 23, 2018, 7:38 p.m. OK Ruby TESTS 69 78 0 1500
39576914 jrodrigues C June 23, 2018, 5:31 p.m. OK Rust TESTS 69 46 0 1500
39584532 yeplastun C June 23, 2018, 11:17 p.m. OK Scala TESTS 69 514 0 1500
39580369 math_botan C June 23, 2018, 7:49 p.m. OK Scala TESTS 69 560 0 1500

remove filters

Back to search problems