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 |
---|---|---|---|---|---|---|
1477 | Codeforces Round 698 (Div. 1) | FINISHED | False | 8100 | 119978699 | Jan. 28, 2021, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 3253 ) | B | Nezzar and Binary String | PROGRAMMING | data structures | 1900 |
B'Nezzar has a binary string s of length n that he wants to share with his best friend, Nanako. Nanako will spend q days inspecting the binary string. At the same time, Nezzar wants to change the string s into string f during these q days, because it looks better. It is known that Nanako loves consistency so much. On the i -th day, Nanako will inspect a segment of string s from position l_i to position r_i inclusive. If the segment contains both characters '0 ' and '1 ', Nanako becomes unhappy and throws away the string. After this inspection, at the i -th night, Nezzar can secretly change strictly less than half of the characters in the segment from l_i to r_i inclusive, otherwise the change will be too obvious. Now Nezzar wonders, if it is possible to avoid Nanako being unhappy and at the same time have the string become equal to the string f at the end of these q days and nights. The first line contains a single integer t ( 1 <= t <= 2 cdot 10^5 ) -- the number of test cases. The first line of each test case contains two integers n,q ( 1 <= n <= 2 cdot 10^5 , 0 <= q <= 2 cdot 10^5 ). The second line of each test case contains a binary string s of length n . The third line of each test case contains a binary string f of length n . Then q lines follow, i -th of them contains two integers l_i,r_i ( 1 <= l_i <= r_i <= n ) -- bounds of the segment, that Nanako will inspect on the i -th day. It is guaranteed that the sum of n for all test cases doesn 't exceed 2 cdot 10^5 , and the sum of q for all test cases doesn 't exceed 2 cdot 10^5 . For each test case, print "YES" on the single line if it is possible to avoid Nanako being unhappy and have the string f at the end of q days and nights. Otherwise, print "NO". You can print each letter in any case (upper'... |
87294 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
105737161 | avm | B | Jan. 28, 2021, 3:36 p.m. | OK | D | TESTS | 38 | 265 | 27136000 | 1900 | |
105746797 | Gassa | B | Jan. 28, 2021, 3:57 p.m. | OK | D | TESTS | 38 | 576 | 13516800 | 1900 | |
105687579 | KoharuHondomachi | B | Jan. 28, 2021, 2:48 p.m. | OK | GNU C++11 | TESTS | 38 | 171 | 8396800 | 1900 | |
105705890 | Kato_Megumi | B | Jan. 28, 2021, 3:09 p.m. | OK | GNU C++11 | TESTS | 38 | 186 | 11673600 | 1900 | |
105695075 | w4p3r | B | Jan. 28, 2021, 2:58 p.m. | OK | GNU C++11 | TESTS | 38 | 187 | 8396800 | 1900 | |
105797007 | CXY07 | B | Jan. 29, 2021, 2:39 a.m. | OK | GNU C++11 | TESTS | 38 | 187 | 8396800 | 1900 | |
105793079 | Wall_breaker | B | Jan. 29, 2021, 12:25 a.m. | OK | GNU C++11 | TESTS | 38 | 187 | 8396800 | 1900 | |
105744270 | fr200110217102 | B | Jan. 28, 2021, 3:51 p.m. | OK | GNU C++11 | TESTS | 38 | 187 | 8396800 | 1900 | |
105718433 | OInfly | B | Jan. 28, 2021, 3:16 p.m. | OK | GNU C++11 | TESTS | 38 | 187 | 8396800 | 1900 | |
105727444 | diamond_dick | B | Jan. 28, 2021, 3:23 p.m. | OK | GNU C++11 | TESTS | 38 | 187 | 12595200 | 1900 | |
105702464 | KagamineRin | B | Jan. 28, 2021, 3:04 p.m. | OK | GNU C++11 | TESTS | 38 | 202 | 8294400 | 1900 | |
105731621 | RainAir | B | Jan. 28, 2021, 3:25 p.m. | OK | GNU C++11 | TESTS | 38 | 202 | 8396800 | 1900 | |
105754129 | jumpmelon | B | Jan. 28, 2021, 4:15 p.m. | OK | GNU C++14 | TESTS | 38 | 218 | 8396800 | 1900 | |
105697290 | y1s1 | B | Jan. 28, 2021, 3:01 p.m. | OK | GNU C++14 | TESTS | 38 | 249 | 4300800 | 1900 | |
105735838 | KbMu | B | Jan. 28, 2021, 3:33 p.m. | OK | GNU C++14 | TESTS | 38 | 249 | 8396800 | 1900 | |
105688335 | yhx-12243 | B | Jan. 28, 2021, 2:49 p.m. | OK | GNU C++14 | TESTS | 38 | 265 | 6246400 | 1900 | |
105688338 | dlalswp25 | B | Jan. 28, 2021, 2:49 p.m. | OK | GNU C++14 | TESTS | 38 | 265 | 8806400 | 1900 | |
105730436 | adurysk | B | Jan. 28, 2021, 3:24 p.m. | OK | GNU C++14 | TESTS | 38 | 265 | 15360000 | 1900 | |
105720282 | Motarack | B | Jan. 28, 2021, 3:19 p.m. | OK | GNU C++14 | TESTS | 38 | 280 | 8396800 | 1900 | |
105746001 | Kwords | B | Jan. 28, 2021, 3:55 p.m. | OK | GNU C++14 | TESTS | 38 | 280 | 8396800 | 1900 | |
105701340 | Evolylenol | B | Jan. 28, 2021, 3:03 p.m. | OK | GNU C++14 | TESTS | 38 | 280 | 8396800 | 1900 | |
105735264 | cscsc | B | Jan. 28, 2021, 3:32 p.m. | OK | GNU C++14 | TESTS | 38 | 280 | 9216000 | 1900 | |
105800111 | Internal_Ghost | B | Jan. 29, 2021, 3:49 a.m. | OK | GNU C++17 | TESTS | 38 | 186 | 9728000 | 1900 | |
105743134 | Mivik | B | Jan. 28, 2021, 3:49 p.m. | OK | GNU C++17 | TESTS | 38 | 187 | 4403200 | 1900 | |
105747059 | ZigZagK | B | Jan. 28, 2021, 3:58 p.m. | OK | GNU C++17 | TESTS | 38 | 187 | 11673600 | 1900 | |
105752566 | amethyst0 | B | Jan. 28, 2021, 4:11 p.m. | OK | GNU C++17 | TESTS | 38 | 218 | 8396800 | 1900 | |
105753484 | fatemetmhr | B | Jan. 28, 2021, 4:13 p.m. | OK | GNU C++17 | TESTS | 38 | 233 | 9728000 | 1900 | |
105783034 | OTTFF | B | Jan. 28, 2021, 7:39 p.m. | OK | GNU C++17 | TESTS | 38 | 234 | 11673600 | 1900 | |
105735913 | evenharder | B | Jan. 28, 2021, 3:33 p.m. | OK | GNU C++17 | TESTS | 38 | 249 | 6553600 | 1900 | |
105806596 | TsReaper | B | Jan. 29, 2021, 5:38 a.m. | OK | GNU C++17 | TESTS | 38 | 249 | 8396800 | 1900 | |
105719786 | azberjibiou | B | Jan. 28, 2021, 3:19 p.m. | OK | GNU C++17 | TESTS | 38 | 249 | 8396800 | 1900 | |
105776580 | Golden | B | Jan. 28, 2021, 6:13 p.m. | OK | GNU C++17 | TESTS | 38 | 249 | 8908800 | 1900 | |
105689109 | yosupo | B | Jan. 28, 2021, 2:51 p.m. | OK | GNU C++17 (64) | TESTS | 38 | 171 | 9318400 | 1900 | |
105688979 | LayCurse | B | Jan. 28, 2021, 2:50 p.m. | OK | GNU C++17 (64) | TESTS | 38 | 171 | 100352000 | 1900 | |
105733711 | eidan | B | Jan. 28, 2021, 3:29 p.m. | OK | GNU C++17 (64) | TESTS | 38 | 186 | 9932800 | 1900 | |
105694647 | ecnerwala | B | Jan. 28, 2021, 2:57 p.m. | OK | GNU C++17 (64) | TESTS | 38 | 187 | 7168000 | 1900 | |
105796339 | inszva | B | Jan. 29, 2021, 2:21 a.m. | OK | GNU C++17 (64) | TESTS | 38 | 187 | 16486400 | 1900 | |
105792320 | kiyoshi0205 | B | Jan. 28, 2021, 11:51 p.m. | OK | GNU C++17 (64) | TESTS | 38 | 202 | 7372800 | 1900 | |
105718221 | minato | B | Jan. 28, 2021, 3:16 p.m. | OK | GNU C++17 (64) | TESTS | 38 | 202 | 10137600 | 1900 | |
105698946 | haruki_K | B | Jan. 28, 2021, 3:02 p.m. | OK | GNU C++17 (64) | TESTS | 38 | 202 | 11980800 | 1900 | |
105802616 | Sakuyalove | B | Jan. 29, 2021, 4:35 a.m. | OK | GNU C++17 (64) | TESTS | 38 | 202 | 14233600 | 1900 | |
105694582 | KanbeKotori | B | Jan. 28, 2021, 2:57 p.m. | OK | GNU C++17 (64) | TESTS | 38 | 202 | 34611200 | 1900 | |
105781218 | clyring | B | Jan. 28, 2021, 7:12 p.m. | OK | Haskell | TESTS | 38 | 1013 | 40038400 | 1900 | |
105687137 | uwi | B | Jan. 28, 2021, 2:47 p.m. | OK | Java 11 | TESTS | 38 | 499 | 11264000 | 1900 | |
105775789 | sarthakmanna | B | Jan. 28, 2021, 6:04 p.m. | OK | Java 11 | TESTS | 38 | 546 | 7577600 | 1900 | |
105713690 | SecondThread | B | Jan. 28, 2021, 3:12 p.m. | OK | Java 11 | TESTS | 38 | 842 | 19660800 | 1900 | |
105748784 | Apfeloxid | B | Jan. 28, 2021, 4:02 p.m. | OK | Java 11 | TESTS | 38 | 1357 | 39321600 | 1900 | |
105795350 | sarthakmanna | B | Jan. 29, 2021, 1:48 a.m. | OK | Java 11 | TESTS | 38 | 1903 | 7884800 | 1900 | |
105735527 | ElragolEl3enab | B | Jan. 28, 2021, 3:33 p.m. | OK | Java 8 | TESTS | 38 | 467 | 4915200 | 1900 | |
105755861 | polyakoff | B | Jan. 28, 2021, 4:19 p.m. | OK | Java 8 | TESTS | 38 | 514 | 10342400 | 1900 | |
105773158 | DarLam | B | Jan. 28, 2021, 5:41 p.m. | OK | Java 8 | TESTS | 38 | 514 | 11980800 | 1900 | |
105777154 | ZerooCool | B | Jan. 28, 2021, 6:19 p.m. | OK | Java 8 | TESTS | 38 | 561 | 17305600 | 1900 | |
105720071 | iakovlev.zakhar | B | Jan. 28, 2021, 3:19 p.m. | OK | Java 8 | TESTS | 38 | 607 | 2867200 | 1900 | |
105762824 | golions | B | Jan. 28, 2021, 4:38 p.m. | OK | Java 8 | TESTS | 38 | 686 | 1945600 | 1900 | |
105747844 | 7dan | B | Jan. 28, 2021, 4 p.m. | OK | Java 8 | TESTS | 38 | 857 | 26726400 | 1900 | |
105780856 | Tlatoani | B | Jan. 28, 2021, 7:07 p.m. | OK | Kotlin | TESTS | 38 | 966 | 27340800 | 1900 | |
105737397 | tarattata1 | B | Jan. 28, 2021, 3:37 p.m. | OK | MS C++ 2017 | TESTS | 38 | 577 | 6553600 | 1900 | |
105771931 | wjli | B | Jan. 28, 2021, 5:32 p.m. | OK | MS C++ 2017 | TESTS | 38 | 577 | 23244800 | 1900 | |
105788660 | grey | B | Jan. 28, 2021, 9:42 p.m. | OK | MS C++ 2017 | TESTS | 38 | 1294 | 14028800 | 1900 | |
105736086 | terry_u16 | B | Jan. 28, 2021, 3:34 p.m. | OK | .NET Core C# | TESTS | 38 | 577 | 22118400 | 1900 | |
105716722 | azukun | B | Jan. 28, 2021, 3:14 p.m. | OK | .NET Core C# | TESTS | 38 | 592 | 21299200 | 1900 | |
105757986 | mban259 | B | Jan. 28, 2021, 4:25 p.m. | OK | .NET Core C# | TESTS | 38 | 826 | 16384000 | 1900 | |
105746813 | fairy_lettuce | B | Jan. 28, 2021, 3:57 p.m. | OK | .NET Core C# | TESTS | 38 | 1496 | 25497600 | 1900 | |
105736500 | titia | B | Jan. 28, 2021, 3:35 p.m. | OK | PyPy 3 | TESTS | 38 | 1481 | 25395200 | 1900 | |
105774536 | pineriver | B | Jan. 28, 2021, 5:52 p.m. | OK | PyPy 3 | TESTS | 38 | 1824 | 38502400 | 1900 | |
105723058 | sansen | B | Jan. 28, 2021, 3:21 p.m. | OK | Rust | TESTS | 38 | 296 | 19148800 | 1900 | |
105755265 | Russell_Emerine | B | Jan. 28, 2021, 4:18 p.m. | OK | Rust | TESTS | 38 | 1856 | 6041600 | 1900 |
Back to search problems