Codeforces Round 404 (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
785 Codeforces Round 404 (Div. 2) FINISHED False 7800 247589663 March 15, 2017, 3:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 7445 ) C Anton and Fairy Tale PROGRAMMING binary search math 1600

B'Anton likes to listen to fairy tales, especially when Danik, Anton 's best friend, tells them. Right now Danik tells Anton a fairy tale: "Once upon a time, there lived an emperor. He was very rich and had much grain. One day he ordered to build a huge barn to put there all his grain. Best builders were building that barn for three days and three nights. But they overlooked and there remained a little hole in the barn, from which every day sparrows came through. Here flew a sparrow, took a grain and flew away..." More formally, the following takes place in the fairy tale. At the beginning of the first day the barn with the capacity of n grains was full. Then, every day (starting with the first day) the following happens: Anton is tired of listening how Danik describes every sparrow that eats grain from the barn. Anton doesn 't know when the fairy tale ends, so he asked you to determine, by the end of which day the barn will become empty for the first time. Help Anton and write a program that will determine the number of that day! The only line of the input contains two integers n and m (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n, xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891018) -- the capacity of the barn and the number of grains that are brought every day. Output one integer -- the number of the day when the barn will become empty for the first time. Days are numbered starting with one. In the first sample the capacity of the barn is five grains and two grains are brought every day. The following happens: So the answer is 4, because by the end of the fourth day the barn becomes empty. '...

Tutorials

Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
66035247 CapNemo C Nov. 30, 2019, 11:30 a.m. OK Clang++17 Diagnostics TESTS 223 46 0 1600
27713941 KagamiharaNadeshiko C June 11, 2017, 2:58 a.m. OK FPC TESTS 223 15 102400 1600
26301212 FlyNN67 C April 11, 2017, 2:22 p.m. OK FPC TESTS 223 15 1638400 1600
25962061 boddiul C March 30, 2017, 7:07 p.m. OK FPC TESTS 223 15 1638400 1600
26225102 MaximkaSV C April 8, 2017, 7:02 p.m. OK FPC TESTS 223 15 1638400 1600
26226657 MaximkaSV C April 8, 2017, 9:09 p.m. OK FPC TESTS 223 15 1638400 1600
26806012 luckystars C May 2, 2017, 4:30 p.m. OK FPC TESTS 223 15 1740800 1600
46395704 chaorenhaha C Nov. 30, 2018, 9:07 a.m. OK FPC TESTS 223 31 0 1600
38818351 chaorenhaha C June 1, 2018, 4:57 a.m. OK FPC TESTS 223 31 3072000 1600
25654219 code-knight C March 19, 2017, 7:35 p.m. OK GNU C TESTS 223 15 1843200 1600
25647909 RitchieD C March 19, 2017, 2:01 p.m. OK GNU C TESTS 223 15 1843200 1600
36056233 diponsaha007 C March 7, 2018, 8:47 p.m. OK GNU C TESTS 223 15 1843200 1600
29040518 vjudge2 C July 31, 2017, 7:36 a.m. OK GNU C TESTS 223 15 1945600 1600
29128851 vjudge3 C Aug. 2, 2017, 11:50 a.m. OK GNU C TESTS 223 15 1945600 1600
26164698 vjudge2 C April 6, 2017, 8:12 a.m. OK GNU C TESTS 223 15 1945600 1600
25793517 the_skinny_one C March 25, 2017, 9:12 a.m. OK GNU C TESTS 223 15 1945600 1600
26311599 vjudge4 C April 12, 2017, 6:04 a.m. OK GNU C TESTS 223 15 1945600 1600
29064133 vjudge5 C July 31, 2017, 3:19 p.m. OK GNU C TESTS 223 15 1945600 1600
29059534 vjudge2 C July 31, 2017, 2:58 p.m. OK GNU C TESTS 223 15 1945600 1600
32337141 vjudge5 C Nov. 15, 2017, 4:17 p.m. OK GNU C++ TESTS 223 15 0 1600
32332786 vjudge5 C Nov. 15, 2017, 1:19 p.m. OK GNU C++ TESTS 223 15 0 1600
32312568 vjudge5 C Nov. 14, 2017, 1:19 p.m. OK GNU C++ TESTS 223 15 0 1600
32310070 vjudge2 C Nov. 14, 2017, 11:45 a.m. OK GNU C++ TESTS 223 15 0 1600
32301937 vjudge1 C Nov. 14, 2017, 2:17 a.m. OK GNU C++ TESTS 223 15 0 1600
31901440 code_crusher jayadhar_Gj dextrous_fingers C Oct. 30, 2017, 5:37 p.m. OK GNU C++ TESTS 223 15 0 1600
31233648 Starry C Oct. 12, 2017, 6:37 a.m. OK GNU C++ TESTS 223 15 0 1600
31177438 shekhar483 C Oct. 9, 2017, 8:51 p.m. OK GNU C++ TESTS 223 15 0 1600
30966254 aditya24.garg C Oct. 3, 2017, 11:47 a.m. OK GNU C++ TESTS 223 15 0 1600
30277665 artistlukas C Sept. 12, 2017, 3:55 a.m. OK GNU C++ TESTS 223 15 0 1600
29263325 vedaantibaliga C Aug. 7, 2017, 11:23 a.m. OK GNU C11 TESTS 223 15 1945600 1600
29129293 vjudge1 C Aug. 2, 2017, 12:07 p.m. OK GNU C11 TESTS 223 15 1945600 1600
26252581 vjudge4 C April 10, 2017, 12:18 p.m. OK GNU C11 TESTS 223 15 1945600 1600
26161996 vjudge5 C April 6, 2017, 4:17 a.m. OK GNU C11 TESTS 223 30 1945600 1600
29113653 vjudge4 C Aug. 2, 2017, 1:22 a.m. OK GNU C11 TESTS 223 30 1945600 1600
48528931 vjudge5 C Jan. 18, 2019, 10:36 a.m. OK GNU C11 TESTS 223 31 0 1600
55517073 vjudge5 C June 13, 2019, 6:06 a.m. OK GNU C11 TESTS 223 31 0 1600
48517129 vjudge2 C Jan. 18, 2019, 5:04 a.m. OK GNU C11 TESTS 223 31 0 1600
26141711 vjudge3 C April 5, 2017, 11:40 a.m. OK GNU C11 TESTS 223 31 1843200 1600
25688209 cielavenir C March 21, 2017, 12:35 p.m. OK GNU C11 TESTS 223 31 1945600 1600
30626502 Dumi250 C Sept. 22, 2017, 10:29 p.m. OK GNU C++11 TESTS 223 15 0 1600
32358405 Bengal_Tiger C Nov. 16, 2017, 2:52 p.m. OK GNU C++11 TESTS 223 15 0 1600
31974384 patak C Nov. 2, 2017, 9:53 a.m. OK GNU C++11 TESTS 223 15 0 1600
31698425 YujinYmune C Oct. 25, 2017, 4:19 a.m. OK GNU C++11 TESTS 223 15 0 1600
31256269 Decayed C Oct. 12, 2017, 5:14 p.m. OK GNU C++11 TESTS 223 15 0 1600
31188095 shreyansh.barodiya C Oct. 10, 2017, 11:33 a.m. OK GNU C++11 TESTS 223 15 0 1600
31006339 javarmgar C Oct. 5, 2017, 3:05 a.m. OK GNU C++11 TESTS 223 15 0 1600
30626485 Dumi250 C Sept. 22, 2017, 10:28 p.m. OK GNU C++11 TESTS 223 15 0 1600
30578525 YazanZk C Sept. 21, 2017, 1:09 p.m. OK GNU C++11 TESTS 223 15 0 1600
30548573 Benq C Sept. 20, 2017, 2:22 p.m. OK GNU C++11 TESTS 223 15 0 1600
32076797 wfrm C Nov. 5, 2017, 1:07 p.m. OK GNU C++14 TESTS 223 15 0 1600
32508089 fedoseev.timofey C Nov. 20, 2017, 6:06 p.m. OK GNU C++14 TESTS 223 15 0 1600
32289042 Wind_Eagle C Nov. 13, 2017, 4:10 p.m. OK GNU C++14 TESTS 223 15 0 1600
32237241 Anachor C Nov. 12, 2017, 7:40 a.m. OK GNU C++14 TESTS 223 15 0 1600
32217839 _LzY_ C Nov. 11, 2017, 11:24 a.m. OK GNU C++14 TESTS 223 15 0 1600
32217671 _LzY_ C Nov. 11, 2017, 11:16 a.m. OK GNU C++14 TESTS 223 15 0 1600
32213924 czdb C Nov. 11, 2017, 8:07 a.m. OK GNU C++14 TESTS 223 15 0 1600
32129691 Ketovdk C Nov. 7, 2017, 7:57 p.m. OK GNU C++14 TESTS 223 15 0 1600
32079155 ianahao C Nov. 5, 2017, 3:08 p.m. OK GNU C++14 TESTS 223 15 0 1600
32078276 ianahao C Nov. 5, 2017, 2:19 p.m. OK GNU C++14 TESTS 223 15 0 1600
36193893 CF_fyk C March 11, 2018, 9:23 a.m. OK GNU C++17 TESTS 223 15 1945600 1600
68123636 parnbhatt23 C Jan. 3, 2020, 2:18 p.m. OK GNU C++17 TESTS 223 31 0 1600
68443213 ktk.prajapati C Jan. 9, 2020, 11:43 a.m. OK GNU C++17 TESTS 223 31 0 1600
68736304 voltag3 C Jan. 13, 2020, 8:24 p.m. OK GNU C++17 TESTS 223 31 0 1600
69064660 OctoBronze C Jan. 18, 2020, 6:04 p.m. OK GNU C++17 TESTS 223 31 0 1600
69290957 Igor_2017 C Jan. 22, 2020, 10:13 a.m. OK GNU C++17 TESTS 223 31 0 1600
69486161 Teasgen C Jan. 24, 2020, 7:39 p.m. OK GNU C++17 TESTS 223 31 0 1600
69832992 husain_froz C Jan. 30, 2020, 11:05 a.m. OK GNU C++17 TESTS 223 31 0 1600
69862231 L_user C Jan. 30, 2020, 6:55 p.m. OK GNU C++17 TESTS 223 31 0 1600
69881998 AkritiG C Jan. 31, 2020, 6:43 a.m. OK GNU C++17 TESTS 223 31 0 1600
25724528 CyberZHG C March 23, 2017, 1:38 a.m. OK Haskell TESTS 223 15 53248000 1600
25803291 ak464tnok C March 25, 2017, 5:44 p.m. OK Haskell TESTS 223 30 44953600 1600
29529642 Omegaxis213 C Aug. 17, 2017, 3:49 p.m. OK Java 8 TESTS 223 109 0 1600
68669510 AhmedZ C Jan. 12, 2020, 4:21 p.m. OK Java 8 TESTS 223 109 0 1600
57799434 adeepgarg13 C July 26, 2019, 12:43 p.m. OK Java 8 TESTS 223 109 0 1600
31951444 coderbond007 C Nov. 1, 2017, 1:27 p.m. OK Java 8 TESTS 223 109 0 1600
27233957 ashubeckham C May 20, 2017, 10:56 a.m. OK Java 8 TESTS 223 109 0 1600
25885148 Old_Cat C March 28, 2017, 11:49 p.m. OK Java 8 TESTS 223 109 20275200 1600
25692809 adityagupta1089 C March 21, 2017, 2:33 p.m. OK Java 8 TESTS 223 109 20480000 1600
29288081 prakhar28 C Aug. 8, 2017, 3:13 p.m. OK Java 8 TESTS 223 109 20582400 1600
25839180 dhaval_lila C March 27, 2017, 1:28 p.m. OK Java 8 TESTS 223 109 20582400 1600
25806083 dumak C March 25, 2017, 8:31 p.m. OK Java 8 TESTS 223 109 20582400 1600
51339689 nemars C March 15, 2019, 3:41 p.m. OK Mono C# TESTS 223 62 102400 1600
27545672 Sorryforpartyrocking C June 3, 2017, 1:20 p.m. OK MS C# TESTS 223 46 204800 1600
26395972 YakovPolykovsky C April 15, 2017, 5:56 p.m. OK MS C# TESTS 223 46 9011200 1600
27545843 Sorryforpartyrocking C June 3, 2017, 1:30 p.m. OK MS C# TESTS 223 61 204800 1600
26920854 wunjai9x C May 7, 2017, 10:06 a.m. OK MS C++ TESTS 223 15 102400 1600
26920827 wunjai9x C May 7, 2017, 10:05 a.m. OK MS C++ TESTS 223 15 102400 1600
26879355 Ancient_mage C May 5, 2017, 11:44 a.m. OK MS C++ TESTS 223 15 102400 1600
27476390 vjudge3 C June 1, 2017, 2:24 a.m. OK MS C++ TESTS 223 15 102400 1600
27565312 vjudge3 C June 4, 2017, 1:54 p.m. OK MS C++ TESTS 223 15 204800 1600
26984091 Volpe C May 9, 2017, 7:52 p.m. OK MS C++ TESTS 223 15 204800 1600
26933445 arsenalducvy C May 7, 2017, 4:40 p.m. OK MS C++ TESTS 223 15 204800 1600
26906173 daniboybye C May 6, 2017, 4:40 p.m. OK MS C++ TESTS 223 15 204800 1600
27565335 vjudge4 C June 4, 2017, 1:56 p.m. OK MS C++ TESTS 223 15 204800 1600
25898055 RCG C March 29, 2017, 2:31 p.m. OK MS C++ TESTS 223 15 1945600 1600
60275976 very_incredible C Sept. 8, 2019, 5:49 p.m. OK MS C++ 2017 TESTS 223 31 0 1600
52616298 Still_Theory C April 11, 2019, 6:37 p.m. OK MS C++ 2017 TESTS 223 31 0 1600
49482193 PavelChadnov C Feb. 5, 2019, 12:14 a.m. OK MS C++ 2017 TESTS 223 31 0 1600
65574160 Dianka C Nov. 23, 2019, 8:49 a.m. OK MS C++ 2017 TESTS 223 31 307200 1600
65699148 vjudge3 C Nov. 25, 2019, 9:53 a.m. OK MS C++ 2017 TESTS 223 31 307200 1600
65575880 velloour C Nov. 23, 2019, 9:22 a.m. OK MS C++ 2017 TESTS 223 31 307200 1600
67690284 sergestus C Dec. 27, 2019, 10:48 a.m. OK MS C++ 2017 TESTS 223 31 307200 1600
69958572 vjudge1 C Feb. 1, 2020, 10:49 a.m. OK MS C++ 2017 TESTS 223 31 307200 1600
59131563 CtrlAlt C Aug. 20, 2019, 11:12 a.m. OK MS C++ 2017 TESTS 223 46 0 1600
69888197 vjudge5 C Jan. 31, 2020, 9 a.m. OK MS C++ 2017 TESTS 223 46 0 1600
25706934 s_p C March 22, 2017, 9:02 a.m. OK Perl TESTS 223 170 7372800 1600
27207916 venkat1997 C May 19, 2017, 5:09 a.m. OK PyPy 2 TESTS 223 77 0 1600
25942218 ryanr1230 C March 30, 2017, 6:06 a.m. OK PyPy 2 TESTS 223 77 21913600 1600
25663485 Yash_ C March 20, 2017, 10:45 a.m. OK PyPy 2 TESTS 223 77 22016000 1600
27755081 dragon.warrior C June 13, 2017, 12:13 p.m. OK PyPy 2 TESTS 223 92 0 1600
35219657 __________ C Feb. 13, 2018, 9:59 p.m. OK PyPy 2 TESTS 223 93 21401600 1600
25692627 formicae C March 21, 2017, 2:26 p.m. OK PyPy 2 TESTS 223 93 22016000 1600
66072599 xiaowuc1 C Nov. 30, 2019, 8:26 p.m. OK PyPy 2 TESTS 223 124 0 1600
41444203 aeternalis1 C Aug. 10, 2018, 9:16 p.m. OK PyPy 2 TESTS 223 124 0 1600
50065529 minyzero C Feb. 17, 2019, 2:37 p.m. OK PyPy 2 TESTS 223 140 0 1600
40387825 Hitesh_0301 C July 15, 2018, 8:13 p.m. OK PyPy 2 TESTS 223 171 1024000 1600
38310383 homoeconomicus C May 16, 2018, 6:06 a.m. OK PyPy 3 TESTS 223 109 21401600 1600
26042903 tomatohakase C April 1, 2017, 4:59 a.m. OK PyPy 3 TESTS 223 124 23142400 1600
27199840 iynaur87 C May 18, 2017, 3:35 p.m. OK PyPy 3 TESTS 223 139 204800 1600
65495313 Michicosun C Nov. 21, 2019, 4:20 p.m. OK PyPy 3 TESTS 223 140 0 1600
55963923 Sturdy C June 23, 2019, 11 a.m. OK PyPy 3 TESTS 223 140 0 1600
46117180 petiteteaparty C Nov. 23, 2018, 2:27 p.m. OK PyPy 3 TESTS 223 140 0 1600
59348802 mihaild C Aug. 23, 2019, 10:56 a.m. OK PyPy 3 TESTS 223 140 102400 1600
68384979 yuzining C Jan. 8, 2020, 5:17 a.m. OK PyPy 3 TESTS 223 155 0 1600
64887499 Charonxu C Nov. 14, 2019, 1:35 p.m. OK PyPy 3 TESTS 223 155 0 1600
63401247 kshitij_sodani C Oct. 25, 2019, 6:26 p.m. OK PyPy 3 TESTS 223 155 0 1600
27409150 Ostkaka C May 28, 2017, 10:24 a.m. OK Python 2 TESTS 223 61 0 1600
26093805 TokuchiToa C April 3, 2017, 7:55 a.m. OK Python 2 TESTS 223 61 4710400 1600
31884873 nadavishe C Oct. 30, 2017, 8:25 a.m. OK Python 2 TESTS 223 62 0 1600
29794779 isgulkov C Aug. 26, 2017, 1:28 a.m. OK Python 2 TESTS 223 62 0 1600
27061029 nikhil_c C May 12, 2017, 7:17 p.m. OK Python 2 TESTS 223 62 0 1600
29104081 Serggor C Aug. 1, 2017, 2:44 p.m. OK Python 2 TESTS 223 62 4710400 1600
28675593 anuraag19 C July 18, 2017, 6:10 p.m. OK Python 2 TESTS 223 62 4710400 1600
26538748 WhatTheFua C April 21, 2017, 1:39 p.m. OK Python 2 TESTS 223 62 4710400 1600
26281202 IcyGirl C April 10, 2017, 6:30 p.m. OK Python 2 TESTS 223 62 4710400 1600
26165685 anton192 C April 6, 2017, 9:14 a.m. OK Python 2 TESTS 223 62 4710400 1600
27673161 Fazle C June 8, 2017, 2:12 p.m. OK Python 3 TESTS 223 62 0 1600
27673143 testerAbstract C June 8, 2017, 2:11 p.m. OK Python 3 TESTS 223 62 0 1600
27671854 Fazle C June 8, 2017, 1:04 p.m. OK Python 3 TESTS 223 62 0 1600
27271751 pernay C May 21, 2017, 5:53 p.m. OK Python 3 TESTS 223 62 0 1600
26920140 wunjai9x C May 7, 2017, 9:21 a.m. OK Python 3 TESTS 223 62 0 1600
29351023 nafeezabrar C Aug. 11, 2017, 11 a.m. OK Python 3 TESTS 223 62 4608000 1600
29350813 nafeezabrar C Aug. 11, 2017, 10:47 a.m. OK Python 3 TESTS 223 62 4608000 1600
29350759 nafeezabrar C Aug. 11, 2017, 10:44 a.m. OK Python 3 TESTS 223 62 4608000 1600
29268850 L1ttleDonkey C Aug. 7, 2017, 4:25 p.m. OK Python 3 TESTS 223 62 4608000 1600
29268742 linjiahao C Aug. 7, 2017, 4:17 p.m. OK Python 3 TESTS 223 62 4608000 1600
30361997 Hillmouse C Sept. 15, 2017, 11:46 a.m. OK Rust TESTS 223 15 614400 1600
25665787 jylilov C March 20, 2017, 12:50 p.m. OK Scala TESTS 223 234 23347200 1600

remove filters

Back to search problems