Codeforces Round 947 (Div. 1 + 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
1975 Codeforces Round 947 (Div. 1 + Div. 2) FINISHED False 10800 20532263 May 25, 2024, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 246 ) G Zimpha Fan Club PROGRAMMING fft greedy math strings 3000

B'One day, Zimpha casually came up with a problem. As a member of "Zimpha fan club", you decided to solve that problem. You are given two strings s and t of length n and m , respectively. Both strings only consist of lowercase English letters, - and *. You need to replace all occurrences of * and -, observing the following rules: Note that you can replace two different instances of - with different characters. You can also replace each two different instances of * with different strings. Suppose s and t have been transformed into s ' and t ' . Now you 're wondering if there 's a replacement that makes s '=t ' . The first line of input contains two integers n and m ( 1 <= q n, m <= q 2 cdot 10^6 ) -- the length of the strings s and t , respectively. The second line contains the string s of length n . It is guaranteed that s only consists of lowercase English letters, - and *. The third line contains the string t of length m . It is guaranteed that t only consists of lowercase English letters, - and *. For each test case, output "Yes" if there is a replacement that makes s '=t ' , and output "No" otherwise. You can output "Yes" and "No" in any case (for example, strings "yEs", "yes", "Yes" and "YES" will be recognized as a positive response). In the second test case, we can transform both strings into ttklwxx. In s , - will be replaced with l. In t , * will be replaced by the empty string with the first and second - will be replaced with k and w respectively. In the fifth test case, we can transform both strings into bulijiojioxdibuliduo. '...

Tutorials

editorial_zh.pdf

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
263073023 schrodingerstom G May 29, 2024, 12:28 a.m. OK C++14 (GCC 6-32) TESTS 105 3561 109465600 3000
263073048 schrodingerstom G May 29, 2024, 12:29 a.m. OK C++14 (GCC 6-32) TESTS 105 3671 109465600 3000
263289047 zhouhuanyi G May 30, 2024, 2:53 p.m. OK C++14 (GCC 6-32) TESTS 105 6343 449536000 3000
263621409 2100031768cse G June 1, 2024, 11:28 a.m. OK C++14 (GCC 6-32) TESTS 106 6390 449536000 3000
263404340 Crystally G May 31, 2024, 3:33 a.m. OK C++14 (GCC 6-32) TESTS 105 11437 148480000 3000
262872018 LG805653 G May 27, 2024, 11:33 a.m. OK C++14 (GCC 6-32) TESTS 96 11734 327577600 3000
263418292 fedimser G May 31, 2024, 6:01 a.m. OK C++17 (GCC 7-32) TESTS 106 108 2764800 3000
262900658 Kaban-5 G May 27, 2024, 3:13 p.m. OK C++17 (GCC 7-32) TESTS 99 4171 198144000 3000
262900857 Kaban-5 G May 27, 2024, 3:15 p.m. OK C++17 (GCC 7-32) TESTS 99 5046 198144000 3000
262842100 thinkphp G May 27, 2024, 7:21 a.m. OK C++17 (GCC 7-32) TESTS 96 6999 411340800 3000
263145377 Mohamedtarekfayez G May 29, 2024, 1:08 p.m. OK C++17 (GCC 7-32) TESTS 105 8609 525107200 3000
263413583 cyb1010 G May 31, 2024, 5:17 a.m. OK C++17 (GCC 7-32) TESTS 106 8874 214528000 3000
262839174 Ramo7fsw G May 27, 2024, 6:59 a.m. OK C++17 (GCC 7-32) TESTS 96 8905 385740800 3000
263000126 SoiMae G May 28, 2024, 11:10 a.m. OK C++17 (GCC 7-32) TESTS 101 8983 244940800 3000
263413797 cyb1010 G May 31, 2024, 5:19 a.m. OK C++17 (GCC 7-32) TESTS 106 9217 215756800 3000
263007891 grass8sheep G May 28, 2024, 12:12 p.m. OK C++17 (GCC 7-32) TESTS 103 9327 221798400 3000
262783382 Qwerty1232 G May 26, 2024, 5:17 p.m. OK C++20 (GCC 13-64) TESTS 96 234 75980800 3000
262782638 Qwerty1232 G May 26, 2024, 5:11 p.m. OK C++20 (GCC 13-64) TESTS 96 249 75468800 3000
262783268 Qwerty1232 G May 26, 2024, 5:16 p.m. OK C++20 (GCC 13-64) TESTS 96 249 75980800 3000
262782874 Qwerty1232 G May 26, 2024, 5:13 p.m. OK C++20 (GCC 13-64) TESTS 96 265 75468800 3000
262782807 Qwerty1232 G May 26, 2024, 5:12 p.m. OK C++20 (GCC 13-64) TESTS 96 265 75468800 3000
262782943 Qwerty1232 G May 26, 2024, 5:13 p.m. OK C++20 (GCC 13-64) TESTS 96 265 75980800 3000
262800022 Qwerty1232 G May 26, 2024, 8:29 p.m. OK C++20 (GCC 13-64) TESTS 96 280 75468800 3000
262799116 Qwerty1232 G May 26, 2024, 8:18 p.m. OK C++20 (GCC 13-64) TESTS 96 280 75980800 3000
262800036 Qwerty1232 G May 26, 2024, 8:29 p.m. OK C++20 (GCC 13-64) TESTS 96 296 75980800 3000
262782508 Qwerty1232 G May 26, 2024, 5:10 p.m. OK C++20 (GCC 13-64) TESTS 96 296 75980800 3000
263326703 Maksim1744 G May 30, 2024, 3:35 p.m. OK Rust 2021 TESTS 105 9530 251596800 3000
263371797 Maksim1744 G May 30, 2024, 5:53 p.m. OK Rust 2021 TESTS 105 9843 251596800 3000
263339114 Maksim1744 G May 30, 2024, 3:55 p.m. OK Rust 2021 TESTS 105 9937 251596800 3000
263191596 Maksim1744 G May 29, 2024, 11:55 p.m. OK Rust 2021 TESTS 105 11140 283648000 3000
263225067 Maksim1744 G May 30, 2024, 10:52 a.m. OK Rust 2021 TESTS 105 11609 251596800 3000

remove filters

Back to search problems