Codeforces Round 545 (Div. 1)

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
1137 Codeforces Round 545 (Div. 1) FINISHED False 9000 185403287 March 8, 2019, 9:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 6242 ) B Camp Schedule PROGRAMMING greedy hashing strings 1700

B"The new camp by widely-known over the country Spring Programming Camp is going to start soon. Hence, all the team of friendly curators and teachers started composing the camp's schedule. After some continuous discussion, they came up with a schedule s , which can be represented as a binary string, in which the i -th symbol is '1' if students will write the contest in the i -th day and '0' if they will have a day off. At the last moment Gleb said that the camp will be the most productive if it runs with the schedule t (which can be described in the same format as schedule s ). Since the number of days in the current may be different from number of days in schedule t , Gleb required that the camp's schedule must be altered so that the number of occurrences of t in it as a substring is maximum possible. At the same time, the number of contest days and days off shouldn't change, only their order may change. Could you rearrange the schedule in the best possible way? The first line contains string s ( 1 <= qslant |s| <= qslant 500 ,000 ), denoting the current project of the camp's schedule. The second line contains string t ( 1 <= qslant |t| <= qslant 500 ,000 ), denoting the optimal schedule according to Gleb. Strings s and t contain characters '0' and '1' only. In the only line print the schedule having the largest number of substrings equal to t . Printed schedule should consist of characters '0' and '1' only and the number of zeros should be equal to the number of zeros in s and the number of ones should be equal to the number of ones in s . In case there multiple optimal schedules, print any of them. In the first example there are two occurrences, one starting from first position and one starting from fourth position. In the second example there is only one occurrence, which starts from third position. Note, that the answer is not unique. For example, if we move the first d"...

Tutorials

Codeforces Round #545 – Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
52155162 1919810 B April 1, 2019, 1:09 p.m. OK Clang++17 Diagnostics TESTS 77 124 2457600 1700
54365905 luogu_bot5 B May 19, 2019, 2:42 a.m. OK FPC TESTS 77 46 6553600 1700
54096574 luogu_bot2 B May 14, 2019, 1:21 p.m. OK FPC TESTS 77 62 6553600 1700
54096701 luogu_bot1 B May 14, 2019, 1:25 p.m. OK FPC TESTS 77 62 6553600 1700
54096467 luogu_bot3 B May 14, 2019, 1:18 p.m. OK FPC TESTS 77 62 6860800 1700
53456991 sansen B April 28, 2019, 3:48 a.m. OK GNU C11 TESTS 77 31 9011200 1700
52305518 vjudge5 B April 4, 2019, 11:53 a.m. OK GNU C11 TESTS 77 31 95641600 1700
51130872 luogu_bot1 B March 10, 2019, 1:39 p.m. OK GNU C++11 TESTS 76 31 2560000 1700
59248880 msuwakow B Aug. 22, 2019, 2:24 a.m. OK GNU C++11 TESTS 77 31 2560000 1700
53306520 FizzyDavid B April 26, 2019, 3:29 a.m. OK GNU C++11 TESTS 77 31 2662400 1700
51076037 _ShadowSong B March 9, 2019, 9:24 a.m. OK GNU C++11 TESTS 76 31 2867200 1700
52019110 Gaozijian B March 30, 2019, 11:51 a.m. OK GNU C++11 TESTS 77 31 2867200 1700
57710642 py_ultron B July 24, 2019, 11:29 p.m. OK GNU C++11 TESTS 77 31 2867200 1700
68988844 birchtree B Jan. 17, 2020, 1:29 p.m. OK GNU C++11 TESTS 77 31 2969600 1700
68586366 vjudge1 B Jan. 11, 2020, 11:23 a.m. OK GNU C++11 TESTS 77 31 2969600 1700
68989446 luogu_bot1 B Jan. 17, 2020, 1:39 p.m. OK GNU C++11 TESTS 77 31 2969600 1700
68988888 birchtree B Jan. 17, 2020, 1:29 p.m. OK GNU C++11 TESTS 77 31 2969600 1700
63096933 Z1h B Oct. 21, 2019, 9:05 p.m. OK GNU C++14 TESTS 77 31 2867200 1700
63096852 _ZCoder_ B Oct. 21, 2019, 9:02 p.m. OK GNU C++14 TESTS 77 31 2867200 1700
51280436 _HYX_ B March 14, 2019, 3:15 a.m. OK GNU C++14 TESTS 77 31 2969600 1700
54172470 vjudge4 B May 15, 2019, 11:59 a.m. OK GNU C++14 TESTS 77 31 2969600 1700
51291475 n_dao107 B March 14, 2019, 10:31 a.m. OK GNU C++14 TESTS 77 31 2969600 1700
51008543 mayaohua2003 B March 8, 2019, 9:21 a.m. OK GNU C++14 TESTS 76 31 2969600 1700
51120418 Origenes B March 10, 2019, 8:58 a.m. OK GNU C++14 TESTS 76 31 3072000 1700
54863997 ManhTr B May 31, 2019, 4:50 a.m. OK GNU C++14 TESTS 77 31 3379200 1700
51042764 Devil B March 8, 2019, 5:34 p.m. OK GNU C++14 TESTS 76 31 3379200 1700
51848261 EulerLee B March 26, 2019, 6:17 a.m. OK GNU C++14 TESTS 77 31 3481600 1700
55305470 tonystarkk B June 8, 2019, 2:09 p.m. OK GNU C++17 TESTS 77 31 2764800 1700
51112567 kdh9949 B March 10, 2019, 5:20 a.m. OK GNU C++17 TESTS 76 31 2969600 1700
52488004 one2345678 B April 8, 2019, 10:15 a.m. OK GNU C++17 TESTS 77 31 2969600 1700
69499459 Rahul_cpp B Jan. 25, 2020, 5:57 a.m. OK GNU C++17 TESTS 77 31 2969600 1700
51010700 roman.kolganov B March 8, 2019, 9:35 a.m. OK GNU C++17 TESTS 76 31 3072000 1700
51161448 LongChampion B March 11, 2019, 12:34 p.m. OK GNU C++17 TESTS 76 31 3072000 1700
51009176 kczno1 B March 8, 2019, 9:25 a.m. OK GNU C++17 TESTS 76 31 3072000 1700
52269954 MazyCrazy B April 3, 2019, 12:47 p.m. OK GNU C++17 TESTS 77 31 3379200 1700
51398130 vjudge1 B March 17, 2019, 5:47 a.m. OK GNU C++17 TESTS 77 31 3481600 1700
51412524 RemiliaScarlet B March 17, 2019, 12:38 p.m. OK GNU C++17 TESTS 77 31 3481600 1700
51441050 cylixstar B March 18, 2019, 9:58 a.m. OK Haskell TESTS 77 187 52633600 1700
51238369 Tomek80 B March 12, 2019, 7:49 p.m. OK Java 8 TESTS 77 124 0 1700
61777512 vjudge4 B Oct. 3, 2019, 12:08 p.m. OK Java 8 TESTS 77 124 0 1700
58715463 saurabhs1206 B Aug. 13, 2019, 1:51 p.m. OK Java 8 TESTS 77 124 0 1700
53204503 StayAwayFromBitches B April 23, 2019, 8:17 p.m. OK Java 8 TESTS 77 124 0 1700
51375573 beroul B March 16, 2019, 1:56 p.m. OK Java 8 TESTS 77 124 0 1700
51119078 Roman-v1 B March 10, 2019, 8:22 a.m. OK Java 8 TESTS 76 124 0 1700
51119037 Roman-v1 B March 10, 2019, 8:21 a.m. OK Java 8 TESTS 76 124 0 1700
51118734 Roman-v1 B March 10, 2019, 8:12 a.m. OK Java 8 TESTS 76 124 0 1700
51241379 Ahmad B March 12, 2019, 10:30 p.m. OK Java 8 TESTS 77 139 0 1700
51051272 safarisoul B March 8, 2019, 9:18 p.m. OK Java 8 TESTS 76 139 0 1700
51058471 keymoon B March 9, 2019, 1:07 a.m. OK Mono C# TESTS 76 249 37888000 1700
68590148 vjudge1 B Jan. 11, 2020, 12:25 p.m. OK MS C++ TESTS 77 31 3481600 1700
61755605 tarattata1 B Oct. 3, 2019, 5:23 a.m. OK MS C++ TESTS 77 31 5529600 1700
64244204 vjudge3 B Nov. 4, 2019, 2:34 p.m. OK MS C++ TESTS 77 46 2969600 1700
64092437 vjudge3 B Nov. 2, 2019, 1 p.m. OK MS C++ TESTS 77 46 3481600 1700
51359487 EnderXiao B March 16, 2019, 6:30 a.m. OK MS C++ TESTS 77 46 3481600 1700
68739340 vjudge5 B Jan. 13, 2020, 10:52 p.m. OK MS C++ TESTS 77 46 3481600 1700
51744383 yp0413170434 B March 23, 2019, 7:05 a.m. OK MS C++ TESTS 77 46 3686400 1700
51013502 wRabbits_AlMag B March 8, 2019, 9:56 a.m. OK MS C++ TESTS 76 46 4096000 1700
64087063 vjudge2 B Nov. 2, 2019, 11:39 a.m. OK MS C++ TESTS 77 78 2969600 1700
64091750 vjudge2 B Nov. 2, 2019, 12:50 p.m. OK MS C++ TESTS 77 78 3072000 1700
53866253 TanPhat B May 8, 2019, 4:17 a.m. OK MS C++ 2017 TESTS 77 46 4300800 1700
58075232 vjudge3 B July 31, 2019, 12:08 p.m. OK MS C++ 2017 TESTS 77 46 4915200 1700
59891516 j2v B Sept. 2, 2019, 10:35 a.m. OK MS C++ 2017 TESTS 77 46 5427200 1700
51225377 maozaozao B March 12, 2019, 1:55 p.m. OK MS C++ 2017 TESTS 77 46 13516800 1700
69375680 thy0602 B Jan. 22, 2020, 6:07 p.m. OK MS C++ 2017 TESTS 77 62 10752000 1700
68583902 vjudge3 B Jan. 11, 2020, 10:46 a.m. OK MS C++ 2017 TESTS 77 78 3072000 1700
51365334 arzchherj B March 16, 2019, 9:18 a.m. OK MS C++ 2017 TESTS 77 78 3481600 1700
52056434 GorNix B March 30, 2019, 8:13 p.m. OK MS C++ 2017 TESTS 77 140 512000 1700
64883152 AKPower_plus B Nov. 14, 2019, 12:16 p.m. OK MS C++ 2017 TESTS 77 140 3788800 1700
64883269 AKPower_plus B Nov. 14, 2019, 12:18 p.m. OK MS C++ 2017 TESTS 77 155 3788800 1700
52787791 Mukundan314 B April 15, 2019, 3:35 p.m. OK PyPy 2 TESTS 77 233 10137600 1700
51475456 fleet B March 19, 2019, 9:07 a.m. OK PyPy 3 TESTS 77 233 20582400 1700
51023658 mathdude42 B March 8, 2019, 11:17 a.m. OK PyPy 3 TESTS 76 280 14848000 1700
51161857 Uranux B March 11, 2019, 12:44 p.m. OK Python 2 TESTS 76 358 11673600 1700
51759542 dhiraj.madan1 B March 23, 2019, 1:08 p.m. OK Python 2 TESTS 77 514 19660800 1700
60217233 thetran B Sept. 7, 2019, 12:16 p.m. OK Python 3 TESTS 77 436 14848000 1700
56506723 Annvv B July 4, 2019, 8:44 a.m. OK Python 3 TESTS 77 467 10854400 1700
51330768 sanvi_kiit B March 15, 2019, 12:04 p.m. OK Python 3 TESTS 77 530 17510400 1700
51820110 huangbinapple B March 25, 2019, 11:36 a.m. OK Python 3 TESTS 77 561 3686400 1700
54322532 praveen.123 B May 17, 2019, 10:48 p.m. OK Python 3 TESTS 77 577 16384000 1700
51673680 huyp B March 22, 2019, 9:24 a.m. OK Python 3 TESTS 77 592 18636800 1700
51673654 Hideonbush-.- B March 22, 2019, 9:23 a.m. OK Python 3 TESTS 77 592 18636800 1700
52586172 kung-fu-master B April 11, 2019, 12:15 a.m. OK Python 3 TESTS 77 623 10649600 1700
51896530 sonya123 B March 27, 2019, 11:49 a.m. OK Python 3 TESTS 77 639 18432000 1700
51541104 macdod B March 19, 2019, 6:20 p.m. OK Python 3 TESTS 77 764 16076800 1700
68110609 gearjack B Jan. 3, 2020, 9:22 a.m. OK Rust TESTS 77 93 23244800 1700

remove filters

Back to search problems