Codeforces Round 307 (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
551 Codeforces Round 307 (Div. 2) FINISHED False 7200 297695699 June 12, 2015, 4:45 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 3861 ) B ZgukistringZ PROGRAMMING brute force constructive algorithms implementation strings 1800

B"Professor GukiZ doesn't accept string as they are. He likes to swap some letters in string to obtain a new one. GukiZ has strings a, b, and c. He wants to obtain string k by swapping some letters in a, so that k should contain as many non-overlapping substrings equal either to b or c as possible. Substring of string x is a string formed by consecutive segment of characters from x. Two substrings of string x overlap if there is position i in string x occupied by both of them. GukiZ was disappointed because none of his students managed to solve the problem. Can you help them and find one of possible strings k? The first line contains string a, the second line contains string b, and the third line contains string c (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89|a|, xe2 x80 x89|b|, xe2 x80 x89|c| xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105, where |s| denotes the length of string s). All three strings consist only of lowercase English letters. It is possible that b and c coincide. Find one of possible strings k, as described in the problem statement. If there are multiple possible answers, print any of them. In the third sample, this optimal solutions has three non-overlaping substrings equal to either b or c on positions 1 xe2 x80 x89 xe2 x80 x93 xe2 x80 x892 (ab), 3 xe2 x80 x89 xe2 x80 x93 xe2 x80 x894 (ab), 5 xe2 x80 x89 xe2 x80 x93 xe2 x80 x897 (aca). In this sample, there exist many other optimal solutions, one of them would be acaababbcc."...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
11622050 tgehr B June 17, 2015, 3:58 p.m. OK D TESTS 61 140 1024000 1800
11784121 AHTuTTuTyX B June 27, 2015, 11:41 a.m. OK Delphi TESTS 61 46 512000 1800
11562420 ruban B June 13, 2015, 4:02 a.m. OK Delphi TESTS 61 77 6758400 1800
11576513 atom_andythomas B June 14, 2015, 4:04 a.m. OK FPC TESTS 61 31 716800 1800
11910074 Xiejiadong B July 3, 2015, 11:37 a.m. OK FPC TESTS 61 31 716800 1800
11584334 WeaverOrFeed B June 14, 2015, 4:01 p.m. OK FPC TESTS 61 31 716800 1800
11592343 Filip B June 15, 2015, 9:33 a.m. OK FPC TESTS 61 31 819200 1800
11564439 lerom B June 13, 2015, 7:20 a.m. OK FPC TESTS 61 31 819200 1800
11568368 irevt B June 13, 2015, 12:58 p.m. OK FPC TESTS 61 46 819200 1800
11558691 xfce8888 B June 12, 2015, 7:47 p.m. OK FPC TESTS 61 62 819200 1800
11596278 haanhpham B June 15, 2015, 3:57 p.m. OK FPC TESTS 61 155 716800 1800
11596098 1415259 B June 15, 2015, 3:37 p.m. OK FPC TESTS 61 155 716800 1800
11910000 cenxx B July 3, 2015, 11:29 a.m. OK FPC TESTS 61 171 409600 1800
11571712 tanid B June 13, 2015, 5:28 p.m. OK GNU C TESTS 61 15 307200 1800
17429164 rainboy B April 22, 2016, 3:12 a.m. OK GNU C TESTS 61 15 2355200 1800
14051813 vjudge5 B Nov. 4, 2015, 5:49 a.m. OK GNU C TESTS 61 30 307200 1800
13524750 hubert0527 B Oct. 10, 2015, 8:46 a.m. OK GNU C TESTS 61 30 307200 1800
13427404 tramper B Oct. 6, 2015, 7:01 a.m. OK GNU C TESTS 61 30 307200 1800
13095622 vjudge3 B Sept. 19, 2015, 3:06 a.m. OK GNU C TESTS 61 30 307200 1800
13095593 NCTU_Baymax B Sept. 19, 2015, 3:02 a.m. OK GNU C TESTS 61 30 307200 1800
14017070 zoe_ B Nov. 2, 2015, 2:57 a.m. OK GNU C TESTS 61 31 307200 1800
14051789 vjudge4 B Nov. 4, 2015, 5:47 a.m. OK GNU C TESTS 61 31 307200 1800
13548978 matej.kunte B Oct. 11, 2015, 4:58 p.m. OK GNU C TESTS 61 31 307200 1800
14921145 vjudge3 B Dec. 22, 2015, 5:56 a.m. OK GNU C++ TESTS 61 15 0 1800
18592846 SoiMae B June 19, 2016, 7:22 a.m. OK GNU C++ TESTS 61 15 102400 1800
14050971 vjudge5 B Nov. 4, 2015, 3:50 a.m. OK GNU C++ TESTS 61 15 102400 1800
13888121 130705009 B Oct. 27, 2015, 9:54 a.m. OK GNU C++ TESTS 61 15 102400 1800
13231240 vjudge3 B Sept. 26, 2015, 10:40 a.m. OK GNU C++ TESTS 61 15 102400 1800
11965193 mike1636216 B July 7, 2015, 10:26 p.m. OK GNU C++ TESTS 61 15 102400 1800
11731522 ghahram1 B June 24, 2015, 5:57 a.m. OK GNU C++ TESTS 61 15 102400 1800
11614535 GoogleBot B June 17, 2015, 3:54 a.m. OK GNU C++ TESTS 61 15 102400 1800
11579279 vjudge4 B June 14, 2015, 9:18 a.m. OK GNU C++ TESTS 61 15 102400 1800
13200459 vjudge3 B Sept. 24, 2015, 7:49 a.m. OK GNU C++ TESTS 61 15 204800 1800
11559375 shanky1994 B June 12, 2015, 8:44 p.m. OK GNU C11 TESTS 61 327 307200 1800
11560776 Fazt B June 12, 2015, 11:58 p.m. OK GNU C11 TESTS 61 327 307200 1800
11574532 yukariko B June 13, 2015, 9:48 p.m. OK GNU C11 TESTS 61 343 307200 1800
13417086 wearelp B Oct. 5, 2015, 1:48 p.m. OK GNU C11 TESTS 61 343 307200 1800
13417089 wearelp B Oct. 5, 2015, 1:49 p.m. OK GNU C11 TESTS 61 343 307200 1800
11560627 Fazt B June 12, 2015, 11:27 p.m. OK GNU C11 TESTS 61 343 307200 1800
14434603 yuehei B Nov. 24, 2015, 3:27 a.m. OK GNU C++11 TESTS 61 15 102400 1800
11570403 YakutovDmitriy B June 13, 2015, 3:40 p.m. OK GNU C++11 TESTS 61 15 102400 1800
16010294 balsa_knez B Feb. 13, 2016, 10:33 p.m. OK GNU C++11 TESTS 61 15 102400 1800
14434594 yuehei B Nov. 24, 2015, 3:26 a.m. OK GNU C++11 TESTS 61 15 102400 1800
16432409 akapros B Feb. 29, 2016, 8:17 p.m. OK GNU C++11 TESTS 61 15 204800 1800
15845333 graszka22 B Feb. 6, 2016, 4:01 p.m. OK GNU C++11 TESTS 61 15 307200 1800
11568674 longbiau B June 13, 2015, 1:24 p.m. OK GNU C++11 TESTS 61 15 307200 1800
11560892 Kirito0 B June 13, 2015, 12:28 a.m. OK GNU C++11 TESTS 61 15 307200 1800
17279592 hungchuhui B April 11, 2016, 2:56 p.m. OK GNU C++11 TESTS 61 15 307200 1800
29601018 vjudge1 B Aug. 19, 2017, 2:35 p.m. OK GNU C++11 TESTS 61 15 614400 1800
27460233 vatsal B May 31, 2017, 6:21 a.m. OK GNU C++14 TESTS 61 15 307200 1800
30407744 afrizal B Sept. 17, 2017, 1:02 a.m. OK GNU C++14 TESTS 61 15 307200 1800
31043599 Harsh424jan B Oct. 5, 2017, 6:06 p.m. OK GNU C++14 TESTS 61 15 409600 1800
30765599 Marckess B Sept. 27, 2017, 1:30 a.m. OK GNU C++14 TESTS 61 15 512000 1800
27350539 vinayjaisinghani B May 26, 2017, 7:33 a.m. OK GNU C++14 TESTS 61 15 512000 1800
27619120 Amerisma B June 6, 2017, 5:34 p.m. OK GNU C++14 TESTS 61 15 512000 1800
30616362 ProgramerAbdelrahman B Sept. 22, 2017, 1:49 p.m. OK GNU C++14 TESTS 61 15 716800 1800
29608313 evonloch B Aug. 19, 2017, 8:48 p.m. OK GNU C++14 TESTS 61 15 716800 1800
30936902 int3xcc B Oct. 2, 2017, 8:10 a.m. OK GNU C++14 TESTS 61 15 716800 1800
30046748 mohamedebnomar1 B Sept. 4, 2017, 4:28 a.m. OK GNU C++14 TESTS 61 15 716800 1800
36249808 vjudge3 B March 13, 2018, 1:14 p.m. OK GNU C++17 TESTS 61 15 2150400 1800
48029941 vjudge3 B Jan. 6, 2019, 11:45 a.m. OK GNU C++17 TESTS 61 30 1740800 1800
42739531 yuhta B Sept. 10, 2018, 3:28 p.m. OK GNU C++17 TESTS 61 31 307200 1800
65255959 ruo B Nov. 17, 2019, 1:25 p.m. OK GNU C++17 TESTS 61 31 307200 1800
59260065 vjudge1 B Aug. 22, 2019, 8:13 a.m. OK GNU C++17 TESTS 61 31 307200 1800
58371850 KafuChino B Aug. 6, 2019, 6:52 a.m. OK GNU C++17 TESTS 61 31 307200 1800
52551595 vjudge4 B April 10, 2019, 5 a.m. OK GNU C++17 TESTS 61 31 307200 1800
66673706 m.hasan01 B Dec. 12, 2019, 10:26 a.m. OK GNU C++17 TESTS 61 31 512000 1800
66735938 IcpcAssiut B Dec. 12, 2019, 6:51 p.m. OK GNU C++17 TESTS 61 31 512000 1800
69578341 Mahdi_Shokoufi B Jan. 26, 2020, 4:21 p.m. OK GNU C++17 TESTS 61 31 512000 1800
11680788 binhuq B June 20, 2015, 10:51 a.m. OK Go TESTS 61 46 1228800 1800
11577743 Eeyore B June 14, 2015, 6:45 a.m. OK Go TESTS 61 62 2355200 1800
14930357 vjudge5 B Dec. 22, 2015, 8:20 p.m. OK Haskell TESTS 61 93 14848000 1800
11694345 ftiasch B June 21, 2015, 9:36 a.m. OK Haskell TESTS 61 124 10649600 1800
14930333 vjudge3 B Dec. 22, 2015, 8:17 p.m. OK Haskell TESTS 61 139 14848000 1800
11667191 itukh B June 19, 2015, 11:21 a.m. OK Java 7 TESTS 61 78 0 1800
13120962 smalex69 B Sept. 21, 2015, 1:34 a.m. OK Java 7 TESTS 61 78 0 1800
12074530 velraman B July 15, 2015, 5:55 p.m. OK Java 7 TESTS 61 78 0 1800
11613057 Gendo_D B June 16, 2015, 10:23 p.m. OK Java 7 TESTS 61 78 0 1800
11577586 Douglas B June 14, 2015, 6:28 a.m. OK Java 7 TESTS 61 78 0 1800
11773348 LuuNhatPhi B June 26, 2015, 1:57 p.m. OK Java 7 TESTS 61 92 0 1800
11586221 tehqin B June 14, 2015, 7:07 p.m. OK Java 7 TESTS 61 92 0 1800
14049415 NeSumHaker B Nov. 3, 2015, 10:44 p.m. OK Java 7 TESTS 61 93 0 1800
13143392 curly B Sept. 22, 2015, 4:03 p.m. OK Java 7 TESTS 61 93 0 1800
12019903 skyrim B July 12, 2015, 2:07 p.m. OK Java 7 TESTS 61 93 0 1800
54795848 amolpratap007 B May 29, 2019, 9:34 a.m. OK Java 8 TESTS 61 109 0 1800
27629947 OmarRadwan B June 7, 2017, 10:02 a.m. OK Java 8 TESTS 61 109 0 1800
14869051 edorundo B Dec. 18, 2015, 11:11 p.m. OK Java 8 TESTS 61 109 0 1800
14336316 mkirsche B Nov. 19, 2015, 3:52 a.m. OK Java 8 TESTS 61 109 0 1800
12105784 bubnov B July 18, 2015, 12:13 p.m. OK Java 8 TESTS 61 109 0 1800
69725490 adarsh000321 B Jan. 29, 2020, 12:07 p.m. OK Java 8 TESTS 61 124 0 1800
58877971 saurabhs1206 B Aug. 15, 2019, 6:59 p.m. OK Java 8 TESTS 61 124 0 1800
53763064 mennafadali B May 4, 2019, 8:39 p.m. OK Java 8 TESTS 61 124 0 1800
53762873 mennafadali B May 4, 2019, 8:27 p.m. OK Java 8 TESTS 61 124 0 1800
53762867 mennafadali B May 4, 2019, 8:27 p.m. OK Java 8 TESTS 61 124 0 1800
11580241 CyberZHG B June 14, 2015, 10:48 a.m. OK JavaScript TESTS 61 78 5427200 1800
11580220 vjudge4 B June 14, 2015, 10:46 a.m. OK JavaScript TESTS 61 93 5427200 1800
16780049 Mem B March 18, 2016, 11 a.m. OK MS C# TESTS 61 46 5017600 1800
13543803 camypaper B Oct. 11, 2015, 9:49 a.m. OK MS C# TESTS 61 61 1228800 1800
12259620 hhsaffar B July 29, 2015, 5:38 a.m. OK MS C# TESTS 61 62 6144000 1800
11563549 Silithus B June 13, 2015, 5:51 a.m. OK MS C# TESTS 61 77 2764800 1800
11558930 Beresta B June 12, 2015, 8:07 p.m. OK MS C# TESTS 61 77 5734400 1800
11912913 georgy.ivanov B July 3, 2015, 3:20 p.m. OK MS C# TESTS 61 186 5939200 1800
11903049 sicon54 B July 2, 2015, 9:42 p.m. OK MS C# TESTS 61 218 1126400 1800
13360735 seeva92 B Oct. 3, 2015, 2:19 p.m. OK MS C# TESTS 61 233 1228800 1800
11582899 navymn B June 14, 2015, 2:35 p.m. OK MS C# TESTS 61 233 1228800 1800
11898143 Death_Knight_DK B July 2, 2015, 1:46 p.m. OK MS C++ TESTS 61 15 409600 1800
30608057 pockey B Sept. 22, 2017, 7:15 a.m. OK MS C++ TESTS 61 15 512000 1800
11598501 SevagD B June 15, 2015, 7:18 p.m. OK MS C++ TESTS 61 15 512000 1800
11563773 nicky_ua B June 13, 2015, 6:12 a.m. OK MS C++ TESTS 61 15 921600 1800
13281028 vjudge3 B Sept. 28, 2015, 2:58 p.m. OK MS C++ TESTS 61 30 307200 1800
12095645 ALEXKIRNAS B July 17, 2015, 1:11 p.m. OK MS C++ TESTS 61 30 307200 1800
11708613 vanche B June 22, 2015, 11:53 a.m. OK MS C++ TESTS 61 30 307200 1800
16548062 Pang B March 6, 2016, 8:10 a.m. OK MS C++ TESTS 61 30 512000 1800
12831151 18312772931 B Sept. 3, 2015, 4:11 p.m. OK MS C++ TESTS 61 30 512000 1800
12221179 pengpengding B July 25, 2015, 4:51 a.m. OK MS C++ TESTS 61 30 512000 1800
64703834 CtrlAlt B Nov. 11, 2019, 3:43 p.m. OK MS C++ 2017 TESTS 61 31 409600 1800
15259242 mayakin B Jan. 8, 2016, 6:48 p.m. OK PHP TESTS 61 77 1331200 1800
11571871 Stebaevin B June 13, 2015, 5:39 p.m. OK PHP TESTS 61 155 1126400 1800
32900345 Lance_HAOH B Dec. 3, 2017, 1:46 p.m. OK PyPy 2 TESTS 61 233 23654400 1800
11730238 trunghieu11 B June 24, 2015, 2:44 a.m. OK PyPy 2 TESTS 61 296 5324800 1800
32900308 LanceTheDragonTrainer B Dec. 3, 2017, 1:44 p.m. OK PyPy 2 TESTS 61 312 23654400 1800
11721458 trunghieu11 B June 23, 2015, 11:06 a.m. OK PyPy 2 TESTS 61 327 5324800 1800
11563932 lyubimov.denis B June 13, 2015, 6:30 a.m. OK PyPy 2 TESTS 61 436 7372800 1800
53490509 noob77777 B April 29, 2019, 8:18 a.m. OK PyPy 2 TESTS 61 452 2048000 1800
62743319 zaceleiseliakai B Oct. 16, 2019, 8:32 p.m. OK PyPy 2 TESTS 61 685 4096000 1800
11679021 lzhanbo B June 20, 2015, 8:03 a.m. OK PyPy 3 TESTS 61 155 11264000 1800
11665800 komendart B June 19, 2015, 9:53 a.m. OK PyPy 3 TESTS 61 156 6553600 1800
11571960 n_knuu B June 13, 2015, 5:47 p.m. OK PyPy 3 TESTS 61 249 5734400 1800
11560620 maxn B June 12, 2015, 11:26 p.m. OK PyPy 3 TESTS 61 295 17408000 1800
11560658 minimario B June 12, 2015, 11:33 p.m. OK PyPy 3 TESTS 61 1387 9932800 1800
35887582 ______u______ B March 3, 2018, 2:07 p.m. OK Python 2 TESTS 61 108 6348800 1800
35887564 ______n______ B March 3, 2018, 2:06 p.m. OK Python 2 TESTS 61 108 6348800 1800
35887180 _____k_____ B March 3, 2018, 1:59 p.m. OK Python 2 TESTS 61 108 6348800 1800
35875361 ______h______ B March 3, 2018, 8:15 a.m. OK Python 2 TESTS 61 108 6348800 1800
35875109 ______k______ B March 3, 2018, 8:08 a.m. OK Python 2 TESTS 61 108 6348800 1800
35874652 ______i______ B March 3, 2018, 7:57 a.m. OK Python 2 TESTS 61 108 6348800 1800
35872996 ______M______ B March 3, 2018, 7:22 a.m. OK Python 2 TESTS 61 108 6348800 1800
15915435 not_bot_but_POT B Feb. 9, 2016, 2:06 p.m. OK Python 2 TESTS 61 109 1740800 1800
11608550 nealzane B June 16, 2015, 2:49 p.m. OK Python 2 TESTS 61 124 1740800 1800
11677940 a2linx B June 20, 2015, 6:17 a.m. OK Python 2 TESTS 61 171 512000 1800
11676380 lzhanbo B June 20, 2015, 2:22 a.m. OK Python 3 TESTS 61 171 1228800 1800
11676311 lzhanbo B June 20, 2015, 2:12 a.m. OK Python 3 TESTS 61 186 1228800 1800
31614579 RccHD B Oct. 22, 2017, 10:03 p.m. OK Python 3 TESTS 61 202 5836800 1800
66739632 kopok2 B Dec. 12, 2019, 7:59 p.m. OK Python 3 TESTS 61 295 1331200 1800
31614563 RccHD B Oct. 22, 2017, 10:02 p.m. OK Python 3 TESTS 61 327 6246400 1800
11583745 rpy3cpp B June 14, 2015, 3:04 p.m. OK Python 3 TESTS 61 561 819200 1800
11571668 n_knuu B June 13, 2015, 5:25 p.m. OK Python 3 TESTS 61 733 1740800 1800
29491677 Qumeric B Aug. 15, 2017, 8:37 p.m. OK Python 3 TESTS 61 842 6963200 1800
54407016 Mohamed_Ayman B May 20, 2019, 7:02 a.m. OK Python 3 TESTS 61 873 921600 1800
42126795 Mk_Python_v1 B Aug. 26, 2018, 3:46 p.m. OK Python 3 TESTS 61 919 2252800 1800
11562341 jiangzhijie B June 13, 2015, 3:53 a.m. OK Ruby TESTS 61 342 921600 1800
11780712 fqw B June 27, 2015, 6:36 a.m. OK Scala TESTS 61 654 307200 1800
11780724 fqw B June 27, 2015, 6:37 a.m. OK Scala TESTS 61 655 307200 1800

remove filters

Back to search problems