Codeforces Round 507 (Div. 2, based on Olympiad of Metropolises)

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
1040 Codeforces Round 507 (Div. 2, based on Olympiad of Metropolises) FINISHED False 7200 195657899 Sept. 5, 2018, 4:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 7111 ) B Shashlik Cooking PROGRAMMING dp greedy math 1300

B"Long story short, shashlik is Miroslav's favorite food. Shashlik is prepared on several skewers simultaneously. There are two states for each skewer: initial and turned over. This time Miroslav laid out n skewers parallel to each other, and enumerated them with consecutive integers from 1 to n in order from left to right. For better cooking, he puts them quite close to each other, so when he turns skewer number i , it leads to turning k closest skewers from each side of the skewer i , that is, skewers number i - k , i - k + 1 , ..., i - 1 , i + 1 , ..., i + k - 1 , i + k (if they exist). For example, let n = 6 and k = 1 . When Miroslav turns skewer number 3 , then skewers with numbers 2 , 3 , and 4 will come up turned over. If after that he turns skewer number 1 , then skewers number 1 , 3 , and 4 will be turned over, while skewer number 2 will be in the initial position (because it is turned again). As we said before, the art of cooking requires perfect timing, so Miroslav wants to turn over all n skewers with the minimal possible number of actions. For example, for the above example n = 6 and k = 1 , two turnings are sufficient: he can turn over skewers number 2 and 5 . Help Miroslav turn over all n skewers. The first line contains two integers n and k ( 1 <= q n <= q 1000 , 0 <= q k <= q 1000 ) -- the number of skewers and the number of skewers from each side that are turned in one step. The first line should contain integer l -- the minimum number of actions needed by Miroslav to turn over all n skewers. After than print l integers from 1 to n denoting the number of the skewer that is to be turned over at the corresponding step. In the first example the first operation turns over skewers 1 , 2 and 3 , the second operation turn"...

Tutorials

Codeforces Round #507 (based on Olympiad of Metropolises) — Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
43419478 vjudge5 B Sept. 25, 2018, 4:59 p.m. OK Clang++17 Diagnostics TESTS 74 46 0 1300
42772384 phongphu934r B Sept. 11, 2018, 4:05 p.m. OK Clang++17 Diagnostics TESTS 74 46 0 1300
42866379 kamesan B Sept. 14, 2018, 3:57 p.m. OK Clang++17 Diagnostics TESTS 74 46 0 1300
43396013 DevilInChina B Sept. 25, 2018, 5:22 a.m. OK Clang++17 Diagnostics TESTS 74 46 0 1300
45119939 vjudge1 B Oct. 31, 2018, 3:10 a.m. OK Clang++17 Diagnostics TESTS 74 46 0 1300
44277043 JudgelightT B Oct. 13, 2018, 11 p.m. OK Clang++17 Diagnostics TESTS 74 46 307200 1300
57605221 _mr.cucumber_ B July 23, 2019, 5:35 p.m. OK Clang++17 Diagnostics TESTS 74 61 0 1300
42590289 PeopleAreStrange B Sept. 6, 2018, 7:35 p.m. OK Clang++17 Diagnostics TESTS 74 61 0 1300
42519766 pchvirov B Sept. 5, 2018, 6:02 p.m. OK Delphi TESTS 74 31 102400 1300
42515469 ruban B Sept. 5, 2018, 5:40 p.m. OK Delphi TESTS 74 31 43315200 1300
42798989 Brainett B Sept. 12, 2018, 1:16 p.m. OK FPC TESTS 74 31 0 1300
42547537 1Demiurg B Sept. 6, 2018, 10 a.m. OK FPC TESTS 74 31 0 1300
42510745 ilya_kas B Sept. 5, 2018, 5:19 p.m. OK FPC TESTS 74 31 0 1300
42542504 BlueSky01 B Sept. 6, 2018, 6:57 a.m. OK FPC TESTS 74 31 102400 1300
44842507 hiep.cbla5 B Oct. 25, 2018, 1:16 p.m. OK FPC TESTS 74 31 204800 1300
42522156 kostia1359 B Sept. 5, 2018, 6:14 p.m. OK FPC TESTS 74 31 204800 1300
42507554 TShT B Sept. 5, 2018, 5:06 p.m. OK FPC TESTS 74 31 4096000 1300
50668181 lxy12138 B March 2, 2019, 5:34 a.m. OK GNU C11 TESTS 74 30 0 1300
50702164 vjudge5 B March 2, 2019, 10:52 p.m. OK GNU C11 TESTS 74 31 0 1300
50706536 vjudge5 B March 3, 2019, 4:29 a.m. OK GNU C11 TESTS 74 31 0 1300
51474611 Ornob011 B March 19, 2019, 8:39 a.m. OK GNU C11 TESTS 74 31 0 1300
51586265 bojverdict1 B March 20, 2019, 4:31 p.m. OK GNU C11 TESTS 74 31 0 1300
52155050 NoSoul B April 1, 2019, 1:07 p.m. OK GNU C11 TESTS 74 31 0 1300
52676593 ...UnknowN... B April 13, 2019, 9:55 a.m. OK GNU C11 TESTS 74 31 0 1300
54239040 doyan021 B May 16, 2019, 12:11 p.m. OK GNU C11 TESTS 74 31 0 1300
69298760 vjudge5 B Jan. 22, 2020, 1:09 p.m. OK GNU C11 TESTS 74 31 0 1300
50680228 2542361651 B March 2, 2019, 11:08 a.m. OK GNU C11 TESTS 74 31 0 1300
42505135 David_Garcia B Sept. 5, 2018, 4:56 p.m. OK GNU C++11 TESTS 74 30 0 1300
42516850 top1_TFT B Sept. 5, 2018, 5:47 p.m. OK GNU C++11 TESTS 74 30 0 1300
46936478 vjudge2 B Dec. 12, 2018, 2:08 p.m. OK GNU C++11 TESTS 74 30 0 1300
68220723 Overstars B Jan. 5, 2020, 4:31 a.m. OK GNU C++11 TESTS 74 31 0 1300
68729391 Rostux B Jan. 13, 2020, 7:16 p.m. OK GNU C++11 TESTS 74 31 0 1300
68989039 monk B Jan. 17, 2020, 1:32 p.m. OK GNU C++11 TESTS 74 31 0 1300
69547484 futa B Jan. 26, 2020, 4:12 a.m. OK GNU C++11 TESTS 74 31 0 1300
65236989 Amandio B Nov. 17, 2019, 7:35 a.m. OK GNU C++11 TESTS 74 31 0 1300
66071316 Kaunta B Nov. 30, 2019, 7:39 p.m. OK GNU C++11 TESTS 74 31 0 1300
67263893 Ankit003 B Dec. 20, 2019, 5:09 a.m. OK GNU C++11 TESTS 74 31 0 1300
47873835 purvilmehta06 B Jan. 3, 2019, 2:16 p.m. OK GNU C++14 TESTS 74 15 0 1300
52720877 alexander.ivakhnenko B April 13, 2019, 7:46 p.m. OK GNU C++14 TESTS 74 30 0 1300
65220634 3MO_Mehisen B Nov. 16, 2019, 8:40 p.m. OK GNU C++14 TESTS 74 30 0 1300
57282724 vishnu_m B July 18, 2019, 1:22 p.m. OK GNU C++14 TESTS 74 30 0 1300
54082633 tushartg B May 14, 2019, 4:53 a.m. OK GNU C++14 TESTS 74 30 0 1300
53882708 Ahmed.Mustafa.0100 B May 8, 2019, 3:51 p.m. OK GNU C++14 TESTS 74 30 0 1300
50924388 zl666 B March 7, 2019, 11:06 a.m. OK GNU C++14 TESTS 74 30 0 1300
50690170 _boundLess_ B March 2, 2019, 3:18 p.m. OK GNU C++14 TESTS 74 30 0 1300
49121604 toughdude123 B Jan. 28, 2019, 7:38 p.m. OK GNU C++14 TESTS 74 30 0 1300
47526654 bqq B Dec. 26, 2018, 4:16 p.m. OK GNU C++14 TESTS 74 30 0 1300
46262865 grol666 B Nov. 26, 2018, 9:48 p.m. OK GNU C++17 TESTS 74 30 0 1300
49831780 andriybosik2002 B Feb. 12, 2019, 2:15 p.m. OK GNU C++17 TESTS 74 30 0 1300
50245313 Error_404 B Feb. 20, 2019, 2:38 p.m. OK GNU C++17 TESTS 74 30 0 1300
52350195 ceass20xx B April 5, 2019, 2:16 p.m. OK GNU C++17 TESTS 74 30 0 1300
52459769 Devshoo B April 7, 2019, 12:58 p.m. OK GNU C++17 TESTS 74 30 0 1300
53855430 Pccc B May 7, 2019, 3:52 p.m. OK GNU C++17 TESTS 74 30 0 1300
54250606 rid.dle B May 16, 2019, 5:01 p.m. OK GNU C++17 TESTS 74 30 0 1300
55012481 duke_knight B June 3, 2019, 10:46 a.m. OK GNU C++17 TESTS 74 30 0 1300
55015255 ravindra_kumawat B June 3, 2019, 12:02 p.m. OK GNU C++17 TESTS 74 30 0 1300
63877913 tranquil_coder B Oct. 30, 2019, 7:38 p.m. OK GNU C++17 TESTS 74 30 0 1300
43666141 Mirolim B Oct. 1, 2018, 10:53 p.m. OK Go TESTS 74 31 0 1300
43666050 Mirolim B Oct. 1, 2018, 10:44 p.m. OK Go TESTS 74 31 0 1300
43345583 Mirolim B Sept. 23, 2018, 8:15 p.m. OK Go TESTS 74 31 0 1300
43345531 Mirolim B Sept. 23, 2018, 8:13 p.m. OK Go TESTS 74 31 0 1300
42847510 Gansito144 B Sept. 14, 2018, 1:59 a.m. OK Go TESTS 74 31 0 1300
42736771 cacophonix B Sept. 10, 2018, 2:09 p.m. OK Go TESTS 74 31 307200 1300
42511455 kamranm B Sept. 5, 2018, 5:22 p.m. OK Go TESTS 74 46 204800 1300
42519748 upvas B Sept. 5, 2018, 6:02 p.m. OK Go TESTS 74 46 2048000 1300
69569538 Kimo_Fathy B Jan. 26, 2020, 1:39 p.m. OK Java 11 TESTS 74 187 0 1300
67681717 satya_p54 B Dec. 27, 2019, 6:46 a.m. OK Java 11 TESTS 74 202 0 1300
69025202 Modi_sarkar B Jan. 18, 2020, 7:05 a.m. OK Java 8 TESTS 74 109 0 1300
61572001 prem_cse B Sept. 30, 2019, 7:01 p.m. OK Java 8 TESTS 74 109 0 1300
58869762 garnacha B Aug. 15, 2019, 2:52 p.m. OK Java 8 TESTS 74 109 0 1300
58566045 Ikari_stream B Aug. 11, 2019, 7:57 a.m. OK Java 8 TESTS 74 109 0 1300
55603854 YousseF_Diaa B June 15, 2019, 8:26 p.m. OK Java 8 TESTS 74 109 0 1300
48468993 SpargelTarzan B Jan. 16, 2019, 6:51 p.m. OK Java 8 TESTS 74 109 0 1300
47880873 MohammadHossam B Jan. 3, 2019, 6:15 p.m. OK Java 8 TESTS 74 109 0 1300
47526999 satya26 B Dec. 26, 2018, 4:28 p.m. OK Java 8 TESTS 74 109 0 1300
46841590 afrizal ibrohimislam antonfireball B Dec. 10, 2018, 8:03 a.m. OK Java 8 TESTS 74 109 0 1300
46708312 viratK B Dec. 7, 2018, 8:41 a.m. OK Java 8 TESTS 74 109 0 1300
42814254 LoayAlaa B Sept. 12, 2018, 11:30 p.m. OK JavaScript TESTS 74 31 1126400 1300
42747262 Filon B Sept. 10, 2018, 8:28 p.m. OK JavaScript TESTS 74 31 1126400 1300
42545933 NguyenHungCuong B Sept. 6, 2018, 9:03 a.m. OK JavaScript TESTS 74 31 1126400 1300
42544419 NguyenHungCuong B Sept. 6, 2018, 8:10 a.m. OK JavaScript TESTS 74 46 1126400 1300
42768974 kihen B Sept. 11, 2018, 2:31 p.m. OK Kotlin TESTS 74 170 614400 1300
42514971 Bobko B Sept. 5, 2018, 5:38 p.m. OK Kotlin TESTS 74 170 614400 1300
42519864 camoroh13 B Sept. 5, 2018, 6:02 p.m. OK Kotlin TESTS 74 171 614400 1300
42507978 erenerisken B Sept. 5, 2018, 5:08 p.m. OK Kotlin TESTS 74 202 307200 1300
42996050 lus4444 B Sept. 17, 2018, 12:05 p.m. OK Mono C# TESTS 74 46 0 1300
55669576 og.kostya B June 17, 2019, 6:40 a.m. OK Mono C# TESTS 74 46 0 1300
50738464 tskhada B March 3, 2019, 2:03 p.m. OK Mono C# TESTS 74 46 0 1300
42511789 sid0adams B Sept. 5, 2018, 5:24 p.m. OK Mono C# TESTS 74 61 0 1300
42645895 DemasteR B Sept. 7, 2018, 4:39 p.m. OK Mono C# TESTS 74 61 0 1300
42675638 lehapenza B Sept. 8, 2018, 1:29 p.m. OK Mono C# TESTS 74 62 0 1300
42903158 StalinGD B Sept. 15, 2018, 8:51 p.m. OK Mono C# TESTS 74 62 0 1300
42677138 TrinidadTobago B Sept. 8, 2018, 2:19 p.m. OK Mono C# TESTS 74 62 0 1300
43560548 zazak B Sept. 29, 2018, 8:45 a.m. OK Mono C# TESTS 74 62 0 1300
44074544 nemars B Oct. 10, 2018, 12:42 p.m. OK Mono C# TESTS 74 62 3584000 1300
64587487 vjudge5 B Nov. 9, 2019, 1:44 p.m. OK MS C++ TESTS 74 31 0 1300
60769920 vjudge3 B Sept. 18, 2019, 12:20 p.m. OK MS C++ TESTS 74 31 0 1300
58959765 vjudge3 B Aug. 17, 2019, 2:39 p.m. OK MS C++ TESTS 74 31 0 1300
58956190 vjudge5 B Aug. 17, 2019, 1:07 p.m. OK MS C++ TESTS 74 31 0 1300
58950895 vjudge1 B Aug. 17, 2019, 10:56 a.m. OK MS C++ TESTS 74 31 0 1300
58939829 vjudge3 B Aug. 17, 2019, 6:25 a.m. OK MS C++ TESTS 74 31 0 1300
58909759 vjudge2 B Aug. 16, 2019, 12:35 p.m. OK MS C++ TESTS 74 31 0 1300
58907111 vjudge1 B Aug. 16, 2019, 11:38 a.m. OK MS C++ TESTS 74 31 0 1300
58906869 vjudge5 B Aug. 16, 2019, 11:32 a.m. OK MS C++ TESTS 74 31 0 1300
58906714 vjudge3 B Aug. 16, 2019, 11:28 a.m. OK MS C++ TESTS 74 31 0 1300
53293050 tdlbw Sasha0738 B April 25, 2019, 4:23 p.m. OK MS C++ 2017 TESTS 74 31 0 1300
58899112 vjudge3 B Aug. 16, 2019, 8:33 a.m. OK MS C++ 2017 TESTS 74 31 0 1300
59695267 Mad112233 B Aug. 30, 2019, 8:16 a.m. OK MS C++ 2017 TESTS 74 31 0 1300
53294011 Stivion Mucaltinum B April 25, 2019, 4:47 p.m. OK MS C++ 2017 TESTS 74 31 0 1300
51684225 swomack B March 22, 2019, 1:54 p.m. OK MS C++ 2017 TESTS 74 31 0 1300
65992662 kubsu B Nov. 29, 2019, 4:49 p.m. OK MS C++ 2017 TESTS 74 31 307200 1300
58908393 make_master B Aug. 16, 2019, 12:06 p.m. OK MS C++ 2017 TESTS 74 31 409600 1300
50681343 REBerserker B March 2, 2019, 11:37 a.m. OK MS C++ 2017 TESTS 74 46 0 1300
58897802 vjudge5 B Aug. 16, 2019, 8:09 a.m. OK MS C++ 2017 TESTS 74 46 0 1300
58899763 vjudge1 B Aug. 16, 2019, 8:46 a.m. OK MS C++ 2017 TESTS 74 46 0 1300
42510201 Guramidev B Sept. 5, 2018, 5:17 p.m. OK Node.js TESTS 74 186 307200 1300
42521003 sk0 B Sept. 5, 2018, 6:08 p.m. OK Ocaml TESTS 74 30 1228800 1300
42680493 FunkyFrog B Sept. 8, 2018, 4:08 p.m. OK PascalABC.NET TESTS 74 46 102400 1300
42798940 Brainett B Sept. 12, 2018, 1:15 p.m. OK PascalABC.NET TESTS 74 46 204800 1300
42544829 OpKos B Sept. 6, 2018, 8:24 a.m. OK PascalABC.NET TESTS 74 61 102400 1300
42508919 l-_-l B Sept. 5, 2018, 5:12 p.m. OK PascalABC.NET TESTS 74 62 102400 1300
42531660 rsFalse B Sept. 5, 2018, 9:07 p.m. OK Perl TESTS 74 46 0 1300
42517419 rsFalse B Sept. 5, 2018, 5:49 p.m. OK Perl TESTS 74 46 204800 1300
43087363 mayakin B Sept. 19, 2018, 4:51 p.m. OK PHP TESTS 74 46 409600 1300
50323890 YESMAths B Feb. 22, 2019, 3:39 p.m. OK PyPy 2 TESTS 74 140 0 1300
42505473 Onesh0t B Sept. 5, 2018, 4:58 p.m. OK PyPy 2 TESTS 74 140 0 1300
42512057 gilou B Sept. 5, 2018, 5:25 p.m. OK PyPy 2 TESTS 74 140 102400 1300
42651751 nealzane B Sept. 7, 2018, 6:56 p.m. OK PyPy 2 TESTS 74 140 204800 1300
57150722 raj1307 B July 16, 2019, 2:40 p.m. OK PyPy 2 TESTS 74 140 307200 1300
43500244 soumyasarkar1998 B Sept. 27, 2018, 4:46 p.m. OK PyPy 2 TESTS 74 155 0 1300
42504350 sarthakmanna B Sept. 5, 2018, 4:53 p.m. OK PyPy 2 TESTS 74 155 0 1300
42513215 pa.n.ik B Sept. 5, 2018, 5:30 p.m. OK PyPy 2 TESTS 74 218 3686400 1300
42508367 ManasG B Sept. 5, 2018, 5:10 p.m. OK PyPy 2 TESTS 74 326 8089600 1300
54891356 chaudhary_19 B May 31, 2019, 8:41 p.m. OK PyPy 3 TESTS 74 124 204800 1300
65724641 algdgn B Nov. 25, 2019, 9:37 p.m. OK PyPy 3 TESTS 74 140 0 1300
62444963 scheduler B Oct. 12, 2019, 10:04 p.m. OK PyPy 3 TESTS 74 140 0 1300
51324484 __Harrison__ B March 15, 2019, 9:01 a.m. OK PyPy 3 TESTS 74 140 0 1300
51324391 __Harrison__ B March 15, 2019, 8:59 a.m. OK PyPy 3 TESTS 74 140 0 1300
51967871 cs1g B March 29, 2019, 10:57 a.m. OK PyPy 3 TESTS 74 140 204800 1300
49739012 abdolsamad B Feb. 10, 2019, 6:23 p.m. OK PyPy 3 TESTS 74 140 204800 1300
45188201 mug B Nov. 1, 2018, 10:20 p.m. OK PyPy 3 TESTS 74 140 204800 1300
42552897 indianfootball B Sept. 6, 2018, 12:58 p.m. OK PyPy 3 TESTS 74 140 204800 1300
42540311 ecnerwala B Sept. 6, 2018, 5:29 a.m. OK PyPy 3 TESTS 74 140 204800 1300
42790973 franckmy B Sept. 12, 2018, 8:28 a.m. OK Python 2 TESTS 74 171 0 1300
42780021 wangkan2001 B Sept. 11, 2018, 8:18 p.m. OK Python 2 TESTS 74 171 0 1300
42552643 tnowakow B Sept. 6, 2018, 12:50 p.m. OK Python 2 TESTS 74 171 0 1300
42536908 zqxu B Sept. 6, 2018, 2:26 a.m. OK Python 2 TESTS 74 171 0 1300
42555984 zomgnarf B Sept. 6, 2018, 2:11 p.m. OK Python 2 TESTS 74 171 716800 1300
43218628 mathturbator B Sept. 21, 2018, 6:09 p.m. OK Python 2 TESTS 74 186 0 1300
42557338 sergeich B Sept. 6, 2018, 2:48 p.m. OK Python 2 TESTS 74 186 0 1300
43578067 SerChirag B Sept. 29, 2018, 3:57 p.m. OK Python 2 TESTS 74 187 0 1300
43318129 AngieM B Sept. 23, 2018, 2:01 p.m. OK Python 2 TESTS 74 187 0 1300
43163040 WNG B Sept. 21, 2018, 2:51 a.m. OK Python 2 TESTS 74 187 0 1300
51767473 ayoubmoussaid B March 23, 2019, 4:35 p.m. OK Python 3 TESTS 74 108 307200 1300
64711018 Bhalerao B Nov. 11, 2019, 6:44 p.m. OK Python 3 TESTS 74 109 0 1300
51766311 mahmuz B March 23, 2019, 4 p.m. OK Python 3 TESTS 74 109 0 1300
51487930 vjudge1 B March 19, 2019, 2:22 p.m. OK Python 3 TESTS 74 109 0 1300
51485221 vjudge4 B March 19, 2019, 1:16 p.m. OK Python 3 TESTS 74 109 0 1300
48582260 rassvetik B Jan. 19, 2019, 5:15 p.m. OK Python 3 TESTS 74 109 0 1300
48496176 toysheeyeyraku B Jan. 17, 2019, 1:04 p.m. OK Python 3 TESTS 74 109 0 1300
47365967 Annvv B Dec. 22, 2018, 11:29 a.m. OK Python 3 TESTS 74 109 0 1300
47323115 bergus B Dec. 21, 2018, 8:53 a.m. OK Python 3 TESTS 74 109 0 1300
42682578 hVasya B Sept. 8, 2018, 5:17 p.m. OK Python 3 TESTS 74 109 0 1300
43064818 duanhv B Sept. 19, 2018, 4:15 a.m. OK Ruby TESTS 74 77 0 1300
42507394 AnandVeeramani B Sept. 5, 2018, 5:06 p.m. OK Ruby TESTS 74 77 0 1300
42519100 clrcldy B Sept. 5, 2018, 5:58 p.m. OK Rust TESTS 74 31 0 1300
42540901 dedok19971 B Sept. 6, 2018, 5:53 a.m. OK Scala TESTS 74 545 307200 1300
42517680 yakamoto B Sept. 5, 2018, 5:51 p.m. OK Scala TESTS 74 576 0 1300
42551026 DrFaust B Sept. 6, 2018, 12:03 p.m. OK Scala TESTS 74 654 1126400 1300

remove filters

Back to search problems