Codeforces Round 582 (Div. 3)

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
1213 Codeforces Round 582 (Div. 3) FINISHED False 7200 170004263 Aug. 30, 2019, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 5246 ) E Two Small Strings PROGRAMMING brute force constructive algorithms 2000

B'You are given two strings s and t both of length 2 and both consisting only of characters 'a ', 'b ' and 'c '. Possible examples of strings s and t : "ab", "ca", "bb". You have to find a string res consisting of 3n characters, n characters should be 'a ', n characters should be 'b ' and n characters should be 'c ' and s and t should not occur in res as substrings. A substring of a string is a contiguous subsequence of that string. So, the strings "ab", "ac" and "cc" are substrings of the string "abacc", but the strings "bc", "aa" and "cb" are not substrings of the string "abacc". If there are multiple answers, you can print any of them. The first line of the input contains one integer n ( 1 <= n <= 10^5 ) -- the number of characters 'a ', 'b ' and 'c ' in the resulting string. The second line of the input contains one string s of length 2 consisting of characters 'a ', 'b ' and 'c '. The third line of the input contains one string t of length 2 consisting of characters 'a ', 'b ' and 'c '. If it is impossible to find the suitable string, print "NO" on the first line. Otherwise print "YES" on the first line and string res on the second line. res should consist of 3n characters, n characters should be 'a ', n characters should be 'b ' and n characters should be 'c ' and s and t should not occur in res as substrings. If there are multiple answers, you can print any of them. '...

Tutorials

Codeforces Round #582 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
60130267 pnt2k2 E Sept. 5, 2019, 4:52 p.m. OK FPC TESTS 65 873 102400 2000
60769048 shenlihong E Sept. 18, 2019, 12:03 p.m. OK GNU C11 TESTS 65 873 0 2000
66525140 luogu_bot4 E Dec. 9, 2019, 4:02 a.m. OK GNU C++11 TESTS 65 31 0 2000
65256046 1710252529 E Nov. 17, 2019, 1:26 p.m. OK GNU C++11 TESTS 65 31 0 2000
65255709 1710252529 E Nov. 17, 2019, 1:20 p.m. OK GNU C++11 TESTS 65 31 0 2000
64368153 Dream-chasing_Juvenile E Nov. 6, 2019, 1:34 p.m. OK GNU C++11 TESTS 65 31 0 2000
64098166 fzzsl E Nov. 2, 2019, 2:34 p.m. OK GNU C++11 TESTS 65 31 0 2000
63665417 vjudge3 E Oct. 28, 2019, 3:09 p.m. OK GNU C++11 TESTS 65 31 0 2000
61665108 xiji233 E Oct. 1, 2019, 5:14 p.m. OK GNU C++11 TESTS 65 31 0 2000
68346886 youngsystem E Jan. 7, 2020, 7:45 a.m. OK GNU C++11 TESTS 65 31 0 2000
68345587 yinghua1314 E Jan. 7, 2020, 7:02 a.m. OK GNU C++11 TESTS 65 31 0 2000
69506927 vjudge2 E Jan. 25, 2020, 9:01 a.m. OK GNU C++11 TESTS 65 31 0 2000
59882745 mtnshh E Sept. 2, 2019, 6:06 a.m. OK GNU C++14 TESTS 65 30 0 2000
60311777 Kart E Sept. 9, 2019, 4:08 p.m. OK GNU C++14 TESTS 65 30 512000 2000
59909599 anatolyefimov E Sept. 2, 2019, 4:44 p.m. OK GNU C++14 TESTS 65 30 921600 2000
61224222 humveea6 E Sept. 24, 2019, 2:45 p.m. OK GNU C++14 TESTS 65 30 1024000 2000
59901275 OkRint E Sept. 2, 2019, 1:46 p.m. OK GNU C++14 TESTS 65 30 1024000 2000
59840796 pratiksha27 E Sept. 1, 2019, 7:07 a.m. OK GNU C++14 TESTS 65 30 1024000 2000
59840729 sarcastic_pebble E Sept. 1, 2019, 7:06 a.m. OK GNU C++14 TESTS 65 30 1024000 2000
66570102 Rods E Dec. 10, 2019, 3:35 a.m. OK GNU C++14 TESTS 65 30 1024000 2000
61300077 follower0523 E Sept. 26, 2019, 4:24 a.m. OK GNU C++14 TESTS 65 30 1638400 2000
68975190 cclqy E Jan. 17, 2020, 8:32 a.m. OK GNU C++14 TESTS 65 31 0 2000
63107590 nishant.ns19 E Oct. 22, 2019, 5:46 a.m. OK GNU C++17 TESTS 65 30 0 2000
59952597 born.kira E Sept. 3, 2019, 3 p.m. OK GNU C++17 TESTS 65 30 1024000 2000
66029022 qdu2017201114 E Nov. 30, 2019, 9:33 a.m. OK GNU C++17 TESTS 65 31 0 2000
69528520 Shajib_ E Jan. 25, 2020, 4:05 p.m. OK GNU C++17 TESTS 65 31 0 2000
69196921 besieger E Jan. 20, 2020, 3:13 p.m. OK GNU C++17 TESTS 65 31 0 2000
68121717 aviroop123 E Jan. 3, 2020, 1:34 p.m. OK GNU C++17 TESTS 65 31 0 2000
67774015 dinosaurs E Dec. 28, 2019, 8:11 a.m. OK GNU C++17 TESTS 65 31 0 2000
66575545 crude_human E Dec. 10, 2019, 7:09 a.m. OK GNU C++17 TESTS 65 31 0 2000
66415934 Petr1Furious E Dec. 6, 2019, 5:06 p.m. OK GNU C++17 TESTS 65 31 0 2000
66218873 Vimmer E Dec. 3, 2019, 10:07 a.m. OK GNU C++17 TESTS 65 31 0 2000
60052521 sighduck E Sept. 5, 2019, 1:36 a.m. OK Go TESTS 65 31 0 2000
60414514 reanimatorzon E Sept. 12, 2019, 12:58 a.m. OK Go TESTS 65 46 0 2000
60821061 cs_office E Sept. 19, 2019, 12:15 a.m. OK Go TESTS 65 61 0 2000
66301774 KulikAlex E Dec. 5, 2019, 7:34 a.m. OK Java 11 TESTS 65 202 0 2000
59886602 dhaNiN E Sept. 2, 2019, 8:19 a.m. OK Java 8 TESTS 65 109 0 2000
69291154 sakt_coder E Jan. 22, 2020, 10:18 a.m. OK Java 8 TESTS 65 124 0 2000
63947803 eng_hardik E Oct. 31, 2019, 7:40 p.m. OK Java 8 TESTS 65 124 0 2000
63302166 dyhu083 E Oct. 24, 2019, 2:36 p.m. OK Java 8 TESTS 65 124 0 2000
63284784 Ruins E Oct. 24, 2019, 9:56 a.m. OK Java 8 TESTS 65 124 0 2000
61444828 potatmen E Sept. 28, 2019, 8:29 p.m. OK Java 8 TESTS 65 124 0 2000
60328713 bhautik_77 E Sept. 10, 2019, 4:13 a.m. OK Java 8 TESTS 65 124 0 2000
60155136 kirik13 E Sept. 6, 2019, 6:26 a.m. OK Java 8 TESTS 65 124 0 2000
59965021 mareshkau E Sept. 3, 2019, 7:58 p.m. OK Java 8 TESTS 65 124 0 2000
59856116 yaoct E Sept. 1, 2019, 1:37 p.m. OK Java 8 TESTS 65 124 0 2000
60461899 RIPBruh._. E Sept. 12, 2019, 9:14 p.m. OK Kotlin TESTS 65 155 409600 2000
60463976 RIPBruh._. E Sept. 12, 2019, 11:10 p.m. OK Kotlin TESTS 65 171 409600 2000
60033950 yakamoto E Sept. 4, 2019, 4:12 p.m. OK Kotlin TESTS 65 171 921600 2000
59861644 rego97 E Sept. 1, 2019, 3:33 p.m. OK Kotlin TESTS 65 171 1126400 2000
60396344 aandrrei E Sept. 11, 2019, 3:04 p.m. OK Kotlin TESTS 65 1216 0 2000
61840090 pashaBrest E Oct. 4, 2019, 9:21 a.m. OK Mono C# TESTS 65 93 4915200 2000
65302799 vjudge4 E Nov. 18, 2019, 1:50 p.m. OK MS C++ TESTS 65 31 0 2000
65912997 vjudge3 E Nov. 28, 2019, 1:35 p.m. OK MS C++ TESTS 65 31 2969600 2000
60398237 NPUlzh E Sept. 11, 2019, 3:43 p.m. OK MS C++ TESTS 65 46 0 2000
65294781 WocBug E Nov. 18, 2019, 11:03 a.m. OK MS C++ TESTS 65 46 102400 2000
65750480 vjudge4 E Nov. 26, 2019, 1:52 p.m. OK MS C++ TESTS 65 46 102400 2000
65912768 vjudge2 E Nov. 28, 2019, 1:30 p.m. OK MS C++ TESTS 65 46 307200 2000
60301623 vjudge2 E Sept. 9, 2019, 12:22 p.m. OK MS C++ TESTS 65 46 4710400 2000
60266571 vjudge5 E Sept. 8, 2019, 1:38 p.m. OK MS C++ TESTS 65 46 4710400 2000
59928347 Againstmoon E Sept. 3, 2019, 5:37 a.m. OK MS C++ 2017 TESTS 65 31 0 2000
59894293 yomyom0824 E Sept. 2, 2019, 11:34 a.m. OK MS C++ 2017 TESTS 65 31 0 2000
59867047 GK_Ebbaka E Sept. 1, 2019, 5:37 p.m. OK MS C++ 2017 TESTS 65 31 0 2000
68876931 SendThemToHell E Jan. 15, 2020, 5:15 p.m. OK MS C++ 2017 TESTS 65 31 307200 2000
61042740 shebao E Sept. 22, 2019, 2:05 a.m. OK MS C++ 2017 TESTS 65 31 307200 2000
60033475 omerb.zeybek E Sept. 4, 2019, 4:03 p.m. OK MS C++ 2017 TESTS 65 31 921600 2000
59832144 Prokopiy E Sept. 1, 2019, 12:24 a.m. OK MS C++ 2017 TESTS 65 31 1126400 2000
62873852 GeKa E Oct. 18, 2019, 2:39 p.m. OK MS C++ 2017 TESTS 65 31 2764800 2000
60945809 Ksenia_C E Sept. 20, 2019, 6:50 p.m. OK MS C++ 2017 TESTS 65 46 0 2000
60263543 Nick333 E Sept. 8, 2019, 12:32 p.m. OK MS C++ 2017 TESTS 65 46 0 2000
60586282 eightants E Sept. 14, 2019, 9:29 p.m. OK PyPy 2 TESTS 65 124 1126400 2000
59917113 iamprayush E Sept. 2, 2019, 7:48 p.m. OK PyPy 2 TESTS 65 156 4300800 2000
59917327 iamprayush E Sept. 2, 2019, 7:54 p.m. OK PyPy 2 TESTS 65 171 6348800 2000
60343961 HybridSkills E Sept. 10, 2019, 11:54 a.m. OK PyPy 3 TESTS 65 140 1740800 2000
59827387 cirpis E Aug. 31, 2019, 8:13 p.m. OK PyPy 3 TESTS 65 155 1433600 2000
68864053 vdv09 E Jan. 15, 2020, 1:01 p.m. OK PyPy 3 TESTS 65 155 1740800 2000
62770549 III_Wolverine_III E Oct. 17, 2019, 10:07 a.m. OK PyPy 3 TESTS 65 155 1740800 2000
61263565 neterukun E Sept. 25, 2019, 12:11 p.m. OK PyPy 3 TESTS 65 155 1740800 2000
60238944 gakhar201 E Sept. 7, 2019, 7:58 p.m. OK PyPy 3 TESTS 65 155 1740800 2000
60026284 PhilTheFish E Sept. 4, 2019, 2:15 p.m. OK PyPy 3 TESTS 65 155 1740800 2000
59852516 smart_hard E Sept. 1, 2019, 12:09 p.m. OK PyPy 3 TESTS 65 155 1740800 2000
59836373 tjake E Sept. 1, 2019, 4:27 a.m. OK PyPy 3 TESTS 65 155 1740800 2000
60179883 pandrei E Sept. 6, 2019, 3:53 p.m. OK PyPy 3 TESTS 65 155 1843200 2000
59849314 kaif_7 E Sept. 1, 2019, 10:49 a.m. OK Python 2 TESTS 65 187 4096000 2000
59926071 ComptineDunAutreEte E Sept. 3, 2019, 4:07 a.m. OK Python 2 TESTS 65 202 4096000 2000
59850025 kaif_7 E Sept. 1, 2019, 11:06 a.m. OK Python 2 TESTS 65 202 4096000 2000
62376628 riskingh E Oct. 11, 2019, 5:31 p.m. OK Python 3 TESTS 65 109 921600 2000
60600624 _42_ E Sept. 15, 2019, 7:48 a.m. OK Python 3 TESTS 65 109 1331200 2000
59942375 Purus_Idiota E Sept. 3, 2019, 11:54 a.m. OK Python 3 TESTS 65 109 1331200 2000
69761752 enutroh E Jan. 29, 2020, 3:35 p.m. OK Python 3 TESTS 65 109 1638400 2000
60601461 _42_ E Sept. 15, 2019, 8:01 a.m. OK Python 3 TESTS 65 109 1638400 2000
59965444 rushabh1 E Sept. 3, 2019, 8:12 p.m. OK Python 3 TESTS 65 109 3788800 2000
60056157 orailly E Sept. 5, 2019, 4:19 a.m. OK Python 3 TESTS 65 124 921600 2000
60813902 OneMoreLoss E Sept. 18, 2019, 7:24 p.m. OK Python 3 TESTS 65 124 1331200 2000
59962309 titia E Sept. 3, 2019, 6:35 p.m. OK Python 3 TESTS 65 124 1331200 2000
59942491 Purus_Idiota E Sept. 3, 2019, 11:56 a.m. OK Python 3 TESTS 65 124 1331200 2000
59839109 arzk E Sept. 1, 2019, 6:16 a.m. OK Rust TESTS 65 31 3174400 2000
59862964 gazaan E Sept. 1, 2019, 4:01 p.m. OK Scala TESTS 65 482 0 2000

remove filters

Back to search problems