Codeforces Round 574 (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
1195 Codeforces Round 574 (Div. 2) FINISHED False 7200 174065087 July 17, 2019, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 20210 ) B Sport Mafia PROGRAMMING binary search brute force math 1100

B"Each evening after the dinner the SIS's students gather together to play the game of Sport Mafia. For the tournament, Alya puts candies into the box, which will serve as a prize for a winner. To do that, she performs n actions. The first action performed is to put a single candy into the box. For each of the remaining moves she can choose from two options: Thus, if the box is empty, then it can only use the second option. For example, one possible sequence of Alya's actions look as follows: This way she will perform 9 actions, the number of candies at the end will be 11 , while Alya will eat 4 candies in total. You know the total number of actions n and the number of candies at the end k . You need to find the total number of sweets Alya ate. That is the number of moves of the first option. It's guaranteed, that for the given n and k the answer always exists. Please note, that during an action of the first option, Alya takes out and eats exactly one candy. The first line contains two integers n and k ( 1 <= n <= 10^9 ; 0 <= k <= 10^9 ) -- the total number of moves and the number of candies in the box at the end. It's guaranteed, that for the given n and k the answer exists. Print a single integer -- the number of candies, which Alya ate. Please note, that in this problem there aren't multiple possible answers -- the answer is unique for any input data. In the first example, Alya has made one move only. According to the statement, the first move is always putting one candy in the box. Hence Alya ate 0 candies. In the second example the possible sequence of Alya's actions looks as follows: This way, she will make exactly n=9 actions and in the end the box will contain 1+2-1-1+3-1+4-1+5=11 candies. The answer is 4 , since she ate 4 candies in total. "...

Tutorials

Разбор Codeforces Round #574 (Div. 2)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
63896816 vjudge2 B Oct. 31, 2019, 2:35 a.m. OK Clang++17 Diagnostics TESTS 53 46 0 1100
57325269 bilotiavaibhav B July 19, 2019, 11:51 a.m. OK Clang++17 Diagnostics TESTS 53 46 0 1100
57892700 Naouk26 B July 28, 2019, 12:24 p.m. OK Clang++17 Diagnostics TESTS 53 46 0 1100
58054204 Manirathnamgodi B July 31, 2019, 4:10 a.m. OK Clang++17 Diagnostics TESTS 53 46 0 1100
67286478 csani B Dec. 20, 2019, 2:25 p.m. OK Clang++17 Diagnostics TESTS 53 62 0 1100
57935229 hatsuyuki15 B July 29, 2019, 10:22 a.m. OK D TESTS 53 31 0 1100
57934829 hatsuyuki15 B July 29, 2019, 10:11 a.m. OK D TESTS 53 31 0 1100
57906351 pavel-afonkin B July 28, 2019, 5:47 p.m. OK Delphi TESTS 53 46 102400 1100
57603609 romanporsh B July 23, 2019, 4:54 p.m. OK FPC TESTS 53 31 0 1100
64157241 Fidisk B Nov. 3, 2019, 1:13 p.m. OK FPC TESTS 53 31 102400 1100
64368175 chaorenhaha B Nov. 6, 2019, 1:34 p.m. OK FPC TESTS 53 31 204800 1100
57908439 2548631 B July 28, 2019, 6:43 p.m. OK FPC TESTS 53 46 0 1100
57632312 MRoy B July 24, 2019, 9:12 a.m. OK GNU C11 TESTS 53 30 0 1100
62455341 rahulgoel B Oct. 13, 2019, 6:11 a.m. OK GNU C11 TESTS 53 31 0 1100
63420576 yigezhe B Oct. 26, 2019, 6:15 a.m. OK GNU C11 TESTS 53 31 0 1100
63885392 vjudge3 B Oct. 31, 2019, 12:17 a.m. OK GNU C11 TESTS 53 31 0 1100
63904571 vjudge4 B Oct. 31, 2019, 6:09 a.m. OK GNU C11 TESTS 53 31 0 1100
65312664 DevJewel B Nov. 18, 2019, 3:57 p.m. OK GNU C11 TESTS 53 31 0 1100
65608314 sidx B Nov. 23, 2019, 10:31 p.m. OK GNU C11 TESTS 53 31 0 1100
65690124 vjudge5 B Nov. 25, 2019, 4:09 a.m. OK GNU C11 TESTS 53 31 0 1100
69067479 ndaidemf B Jan. 18, 2020, 7:21 p.m. OK GNU C11 TESTS 53 31 0 1100
69723594 pantw B Jan. 29, 2020, 11:31 a.m. OK GNU C11 TESTS 53 31 0 1100
57252350 Rainbow_sjy B July 18, 2019, 12:25 a.m. OK GNU C++11 TESTS 53 15 0 1100
57370776 vjudge1 B July 20, 2019, 10:51 a.m. OK GNU C++11 TESTS 53 30 0 1100
57479606 vjudge2 B July 22, 2019, 1:35 a.m. OK GNU C++11 TESTS 53 30 0 1100
57950933 lhy0930 B July 29, 2019, 4:26 p.m. OK GNU C++11 TESTS 53 30 0 1100
58208494 lsroi B Aug. 3, 2019, 8 a.m. OK GNU C++11 TESTS 53 30 0 1100
57348407 xuanhuangwendao B July 20, 2019, 1:43 a.m. OK GNU C++11 TESTS 53 30 0 1100
58314484 BUCTAlex B Aug. 5, 2019, 2:05 a.m. OK GNU C++11 TESTS 53 30 0 1100
59656943 _shl. B Aug. 29, 2019, 10:50 a.m. OK GNU C++11 TESTS 53 30 0 1100
60392293 vjudge1 B Sept. 11, 2019, 1:43 p.m. OK GNU C++11 TESTS 53 30 0 1100
58239340 dheerajtiwari B Aug. 3, 2019, 10:21 p.m. OK GNU C++11 TESTS 53 30 0 1100
57308472 ameykudari05 B July 19, 2019, 5:23 a.m. OK GNU C++14 TESTS 53 15 0 1100
68823470 husseinalhussein2001 B Jan. 14, 2020, 6:14 p.m. OK GNU C++14 TESTS 53 15 0 1100
64203675 Ilove_coding B Nov. 4, 2019, 12:13 p.m. OK GNU C++14 TESTS 53 15 0 1100
63076609 ONIsal B Oct. 21, 2019, 1:53 p.m. OK GNU C++14 TESTS 53 15 0 1100
59582235 Poseidon-0711 B Aug. 27, 2019, 4:32 p.m. OK GNU C++14 TESTS 53 15 0 1100
57750658 twisted_ninja B July 25, 2019, 2:41 p.m. OK GNU C++14 TESTS 53 15 0 1100
57596918 bpsr B July 23, 2019, 2:17 p.m. OK GNU C++14 TESTS 53 15 0 1100
57368053 vjudge5 B July 20, 2019, 9:51 a.m. OK GNU C++14 TESTS 53 15 0 1100
57317702 Niubility_n B July 19, 2019, 8:48 a.m. OK GNU C++14 TESTS 53 15 0 1100
57316744 Hd7 B July 19, 2019, 8:29 a.m. OK GNU C++14 TESTS 53 15 0 1100
57303622 vjudge5 B July 19, 2019, 2:07 a.m. OK GNU C++17 TESTS 53 15 0 1100
57362755 ketos B July 20, 2019, 8:16 a.m. OK GNU C++17 TESTS 53 15 0 1100
57830804 TselmegKh B July 27, 2019, 5:57 a.m. OK GNU C++17 TESTS 53 15 0 1100
57919939 vjudge2 B July 29, 2019, 4:07 a.m. OK GNU C++17 TESTS 53 15 0 1100
58053687 youyouyouyou B July 31, 2019, 3:53 a.m. OK GNU C++17 TESTS 53 15 0 1100
58993624 Zyrax B Aug. 18, 2019, 10:20 a.m. OK GNU C++17 TESTS 53 15 0 1100
59385512 yafngzh B Aug. 24, 2019, 6:10 a.m. OK GNU C++17 TESTS 53 15 0 1100
63040415 Sailor32 B Oct. 21, 2019, 12:11 a.m. OK GNU C++17 TESTS 53 15 0 1100
68146006 Byakko B Jan. 4, 2020, 4:25 a.m. OK GNU C++17 TESTS 53 15 0 1100
69181486 MaHiR.RatAnPaRa B Jan. 20, 2020, 10:20 a.m. OK GNU C++17 TESTS 53 15 0 1100
57375271 efimmanevich B July 20, 2019, 12:21 p.m. OK Go TESTS 53 30 0 1100
59708171 reanimatorzon B Aug. 30, 2019, 1:33 p.m. OK Go TESTS 53 31 0 1100
57501749 predicate B July 22, 2019, 10:28 a.m. OK Go TESTS 53 31 0 1100
57374678 efimmanevich B July 20, 2019, 12:07 p.m. OK Go TESTS 53 31 0 1100
57282741 suryanshv23 B July 18, 2019, 1:22 p.m. OK Go TESTS 53 31 0 1100
59624595 sighduck B Aug. 28, 2019, 3:26 p.m. OK Go TESTS 53 46 0 1100
57781008 TangentDay B July 26, 2019, 5:57 a.m. OK Go TESTS 53 46 0 1100
57375105 efimmanevich B July 20, 2019, 12:17 p.m. OK Go TESTS 53 46 0 1100
63879243 vjudge1 B Oct. 30, 2019, 8:07 p.m. OK Go TESTS 53 592 0 1100
57235182 zwwhdls B July 17, 2019, 4:20 p.m. OK Go TESTS 53 686 0 1100
57283762 mihassan B July 18, 2019, 1:44 p.m. OK Haskell TESTS 53 46 102400 1100
69860655 GiantTornado B Jan. 30, 2020, 6:24 p.m. OK Java 11 TESTS 53 186 0 1100
69178063 warrioramrit B Jan. 20, 2020, 8:55 a.m. OK Java 11 TESTS 53 186 0 1100
69177973 warrioramrit B Jan. 20, 2020, 8:52 a.m. OK Java 11 TESTS 53 186 0 1100
69178053 warrioramrit B Jan. 20, 2020, 8:54 a.m. OK Java 11 TESTS 53 187 0 1100
68638439 TheDarkKnight03 B Jan. 12, 2020, 6:42 a.m. OK Java 11 TESTS 53 202 0 1100
68047521 sumac B Jan. 1, 2020, 5:09 p.m. OK Java 11 TESTS 53 202 0 1100
65107831 ashanksingh1997 B Nov. 15, 2019, 8:14 p.m. OK Java 11 TESTS 53 202 0 1100
57290089 O_E B July 18, 2019, 4:18 p.m. OK Java 8 TESTS 53 108 0 1100
69098099 StEpAn_123 B Jan. 19, 2020, 12:52 p.m. OK Java 8 TESTS 53 109 0 1100
65032342 termito1617 B Nov. 15, 2019, 10:24 a.m. OK Java 8 TESTS 53 109 0 1100
59681976 sarthakmanna B Aug. 29, 2019, 9:20 p.m. OK Java 8 TESTS 53 109 0 1100
58959442 PaoloP B Aug. 17, 2019, 2:30 p.m. OK Java 8 TESTS 53 109 0 1100
58878743 icpc_loser B Aug. 15, 2019, 7:26 p.m. OK Java 8 TESTS 53 109 0 1100
58684797 Agnimandur B Aug. 12, 2019, 9:36 p.m. OK Java 8 TESTS 53 109 0 1100
58549317 Jarik B Aug. 10, 2019, 6:39 p.m. OK Java 8 TESTS 53 109 0 1100
58072874 SunR1se B July 31, 2019, 11:20 a.m. OK Java 8 TESTS 53 109 0 1100
57889215 7dan B July 28, 2019, 11:11 a.m. OK Java 8 TESTS 53 109 0 1100
57512238 luogu_bot4 B July 22, 2019, 2:17 p.m. OK JavaScript TESTS 53 31 102400 1100
57232588 kuzAnatoliy B July 17, 2019, 4:08 p.m. OK JavaScript TESTS 53 46 102400 1100
57511983 EdmilDM B July 22, 2019, 2:11 p.m. OK JavaScript TESTS 53 46 204800 1100
57250727 Tlatoani B July 17, 2019, 10:40 p.m. OK Kotlin TESTS 53 139 0 1100
57256927 Spheniscine B July 18, 2019, 2:52 a.m. OK Kotlin TESTS 53 140 102400 1100
57296890 Flame239 B July 18, 2019, 7:49 p.m. OK Kotlin TESTS 53 155 102400 1100
57260302 mendel_vv B July 18, 2019, 4:46 a.m. OK Kotlin TESTS 53 155 102400 1100
57256860 Spheniscine B July 18, 2019, 2:51 a.m. OK Kotlin TESTS 53 155 102400 1100
57256361 Spheniscine B July 18, 2019, 2:38 a.m. OK Kotlin TESTS 53 155 102400 1100
57246889 dkozak94 B July 17, 2019, 7:52 p.m. OK Kotlin TESTS 53 155 102400 1100
57255760 Spheniscine B July 18, 2019, 2:23 a.m. OK Kotlin TESTS 53 155 204800 1100
57325176 TRR B July 19, 2019, 11:48 a.m. OK Mono C# TESTS 53 46 0 1100
57312206 Dimon2305 B July 19, 2019, 6:55 a.m. OK Mono C# TESTS 53 46 0 1100
63874611 vjudge3 B Oct. 30, 2019, 6:34 p.m. OK Mono C# TESTS 53 46 0 1100
58968705 treasuryonly B Aug. 17, 2019, 7:06 p.m. OK Mono C# TESTS 53 61 0 1100
59608406 trolina32 B Aug. 28, 2019, 9:51 a.m. OK Mono C# TESTS 53 62 0 1100
65211355 nastya1199 B Nov. 16, 2019, 6 p.m. OK Mono C# TESTS 53 62 0 1100
57250478 zazak B July 17, 2019, 10:26 p.m. OK Mono C# TESTS 53 62 0 1100
57459421 fasdfs12137 B July 21, 2019, 12:58 p.m. OK Mono C# TESTS 53 62 0 1100
58622031 Salatik231166 B Aug. 11, 2019, 4:11 p.m. OK Mono C# TESTS 53 62 3584000 1100
57242533 boomx B July 17, 2019, 6:02 p.m. OK Mono C# TESTS 53 62 3584000 1100
64197248 holder94 B Nov. 4, 2019, 10:12 a.m. OK MS C++ TESTS 53 31 0 1100
65350961 TianZuiXing B Nov. 19, 2019, 2:21 p.m. OK MS C++ TESTS 53 31 0 1100
65618198 TianSunXing B Nov. 24, 2019, 5:04 a.m. OK MS C++ TESTS 53 31 0 1100
65696877 vjudge5 B Nov. 25, 2019, 8:43 a.m. OK MS C++ TESTS 53 31 0 1100
65698456 vjudge3 B Nov. 25, 2019, 9:33 a.m. OK MS C++ TESTS 53 31 0 1100
66020621 cxol B Nov. 30, 2019, 7:14 a.m. OK MS C++ TESTS 53 31 0 1100
66456684 vjudge5 B Dec. 7, 2019, 1:23 p.m. OK MS C++ TESTS 53 31 0 1100
68473884 kero_es7ak B Jan. 10, 2020, 4:08 a.m. OK MS C++ TESTS 53 31 0 1100
69459445 vjudge1 B Jan. 24, 2020, 10:03 a.m. OK MS C++ TESTS 53 31 0 1100
69723766 vjudge5 B Jan. 29, 2020, 11:34 a.m. OK MS C++ TESTS 53 31 0 1100
57478654 dr.feishuo B July 22, 2019, 1 a.m. OK MS C++ 2017 TESTS 53 30 0 1100
59693771 guoriyue B Aug. 30, 2019, 7:31 a.m. OK MS C++ 2017 TESTS 53 31 0 1100
60746545 coder_pikachu B Sept. 18, 2019, 2:11 a.m. OK MS C++ 2017 TESTS 53 31 0 1100
60505124 Vfrost26 B Sept. 13, 2019, 8:57 p.m. OK MS C++ 2017 TESTS 53 31 0 1100
60064443 newdeal B Sept. 5, 2019, 8:30 a.m. OK MS C++ 2017 TESTS 53 31 0 1100
59780339 vjudge2 B Aug. 31, 2019, 2:44 a.m. OK MS C++ 2017 TESTS 53 31 0 1100
69726484 shaan11 B Jan. 29, 2020, 12:25 p.m. OK MS C++ 2017 TESTS 53 31 0 1100
68690012 suun B Jan. 13, 2020, 5:40 a.m. OK MS C++ 2017 TESTS 53 31 0 1100
65760482 MRamanauskas B Nov. 26, 2019, 3:39 p.m. OK MS C++ 2017 TESTS 53 31 0 1100
64881393 TianJianXing B Nov. 14, 2019, 11:44 a.m. OK MS C++ 2017 TESTS 53 31 0 1100
68619818 Azenis123 B Jan. 11, 2020, 7:03 p.m. OK Node.js TESTS 53 171 1126400 1100
59917965 evanli2014 B Sept. 2, 2019, 8:17 p.m. OK Node.js TESTS 53 186 1126400 1100
57278075 dadafaWang B July 18, 2019, 11:40 a.m. OK Node.js TESTS 53 187 921600 1100
57616738 Gardes B July 24, 2019, 2:01 a.m. OK Node.js TESTS 53 202 3993600 1100
57572343 lazyc97 B July 23, 2019, 5:46 a.m. OK Ocaml TESTS 53 31 0 1100
57333772 Alex_D B July 19, 2019, 3:13 p.m. OK PascalABC.NET TESTS 53 389 307200 1100
57615481 BasF B July 24, 2019, 1:14 a.m. OK PascalABC.NET TESTS 53 530 102400 1100
57450866 mayakin B July 21, 2019, 9:41 a.m. OK PHP TESTS 53 62 512000 1100
57342141 snape_here B July 19, 2019, 7:26 p.m. OK PyPy 2 TESTS 53 124 0 1100
57308759 danielfleischman B July 19, 2019, 5:31 a.m. OK PyPy 2 TESTS 53 124 204800 1100
59915133 petabyte0 B Sept. 2, 2019, 6:50 p.m. OK PyPy 2 TESTS 53 140 102400 1100
58973546 yumtam B Aug. 17, 2019, 10:05 p.m. OK PyPy 2 TESTS 53 155 204800 1100
57632949 jolt.tks B July 24, 2019, 9:27 a.m. OK PyPy 2 TESTS 53 155 204800 1100
57300585 -Morass- B July 18, 2019, 11 p.m. OK PyPy 2 TESTS 53 155 512000 1100
57274282 drd93 B July 18, 2019, 10:10 a.m. OK PyPy 2 TESTS 53 248 3993600 1100
58830947 ssk497 B Aug. 14, 2019, 5:54 p.m. OK PyPy 2 TESTS 53 249 8499200 1100
62530580 Ravi_Napit B Oct. 13, 2019, 7:09 p.m. OK PyPy 3 TESTS 53 139 0 1100
60688168 kedar116 B Sept. 16, 2019, 4:14 p.m. OK PyPy 3 TESTS 53 139 0 1100
57792530 tai45236 B July 26, 2019, 10:03 a.m. OK PyPy 3 TESTS 53 139 0 1100
57501411 pavel_radist B July 22, 2019, 10:19 a.m. OK PyPy 3 TESTS 53 139 0 1100
57555985 j_peters B July 22, 2019, 7:45 p.m. OK PyPy 3 TESTS 53 139 1433600 1100
62686630 WA-----Me-----AC B Oct. 16, 2019, 2:14 p.m. OK PyPy 3 TESTS 53 140 0 1100
68763721 Mkay6122 B Jan. 14, 2020, 9:06 a.m. OK PyPy 3 TESTS 53 140 0 1100
65304931 Felix555 B Nov. 18, 2019, 2:31 p.m. OK PyPy 3 TESTS 53 140 0 1100
64507550 lke_python B Nov. 8, 2019, 7:31 a.m. OK PyPy 3 TESTS 53 140 0 1100
63919352 ac_97 B Oct. 31, 2019, 11:12 a.m. OK PyPy 3 TESTS 53 140 0 1100
69283026 shubhamgoyal__ B Jan. 22, 2020, 6:51 a.m. OK Python 2 TESTS 53 171 0 1100
58948371 bhishma blizzardofoz B Aug. 17, 2019, 9:55 a.m. OK Python 2 TESTS 53 186 0 1100
63877434 vjudge3 B Oct. 30, 2019, 7:28 p.m. OK Python 2 TESTS 53 187 0 1100
57643990 Luxo B July 24, 2019, 1:36 p.m. OK Python 2 TESTS 53 187 0 1100
57418347 Helli.code B July 20, 2019, 5:53 p.m. OK Python 2 TESTS 53 187 0 1100
64544851 galim665 B Nov. 8, 2019, 7:56 p.m. OK Python 3 TESTS 53 109 0 1100
64433518 LeiviniaBirdway B Nov. 6, 2019, 11:15 p.m. OK Python 3 TESTS 53 109 0 1100
64047577 vjudge4 B Nov. 1, 2019, 8:02 p.m. OK Python 3 TESTS 53 109 0 1100
63902964 vjudge2 B Oct. 31, 2019, 5:30 a.m. OK Python 3 TESTS 53 109 0 1100
63884885 vjudge5 B Oct. 30, 2019, 11:52 p.m. OK Python 3 TESTS 53 109 0 1100
63701360 Eldary89 B Oct. 29, 2019, 7:26 a.m. OK Python 3 TESTS 53 109 0 1100
63269483 Salmonize B Oct. 24, 2019, 3 a.m. OK Python 3 TESTS 53 109 0 1100
62683067 _viru_ B Oct. 16, 2019, 1:22 p.m. OK Python 3 TESTS 53 109 0 1100
61780695 gatis B Oct. 3, 2019, 1:05 p.m. OK Python 3 TESTS 53 109 0 1100
60404252 imshahid B Sept. 11, 2019, 5:55 p.m. OK Python 3 TESTS 53 109 0 1100
57271401 Trunikruth B July 18, 2019, 9:01 a.m. OK Ruby TESTS 53 62 0 1100
57271314 Trunikruth B July 18, 2019, 8:59 a.m. OK Ruby TESTS 53 77 0 1100
57991624 Lancern B July 30, 2019, 1:28 p.m. OK Rust TESTS 53 31 0 1100
57339414 kobae964 B July 19, 2019, 5:44 p.m. OK Rust TESTS 53 31 307200 1100
59568033 matijap B Aug. 27, 2019, 11:30 a.m. OK Rust TESTS 53 46 0 1100

remove filters

Back to search problems