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 |
---|---|---|---|---|---|---|
1733 | Codeforces Round 821 (Div. 2) | FINISHED | False | 7200 | 73668263 | Sept. 19, 2022, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 13842 ) | D1 | Zero-One (Easy Version) | PROGRAMMING | dp greedy math |
B"This is the easy version of the problem. In this version, n <= 3000 , x ge y holds. You can make hacks only if both versions of the problem are solved. You are given two binary strings a and b , both of length n . You can do the following operation any number of times (possibly zero). You have to find the minimum cost needed to make a equal to b or say there is no way to do so. The first line contains one integer t ( 1 <= t <= 600 ) -- the number of test cases. Each test case consists of three lines. The first line of each test case contains three integers n , x , and y ( 5 <= n <= 3000 , 1 <= y <= x <= 10^9 ) -- the length of the strings, and the costs per operation. The second line of each test case contains the string a of length n . The string only consists of digits 0 and 1 . The third line of each test case contains the string b of length n . The string only consists of digits 0 and 1 . It is guaranteed that the sum of n over all test cases doesn't exceed 3000 . For each test case, if there is no way to make a equal to b , print -1 . Otherwise, print the minimum cost needed to make a equal to b . In the first test case, selecting indices 2 and 3 costs 8 , which is the minimum possible cost. In the second test case, we cannot make a equal to b using any number of operations. In the third test case, we can perform the following operations: The total cost is 6 . In the fourth test case, we don't have to perform any operations. "... |
Codeforces Round #821 (Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
172765350 | FatalityNT | D1 | Sept. 19, 2022, 9:29 p.m. | OK | C# 8 | TESTS | 15 | 78 | 614400 | ||
172766683 | FatalityNT | D1 | Sept. 19, 2022, 10:01 p.m. | OK | C# 8 | TESTS | 15 | 109 | 409600 | ||
172742739 | Neha_krishna | D1 | Sept. 19, 2022, 5:11 p.m. | OK | Clang++20 Diagnostics | TESTS | 15 | 31 | 12595200 | ||
172744176 | ruban | D1 | Sept. 19, 2022, 5:19 p.m. | OK | Delphi | TESTS | 15 | 15 | 11366400 | ||
172788606 | gxh2538351719 | D1 | Sept. 20, 2022, 5:46 a.m. | OK | GNU C++14 | TESTS | 15 | 0 | 0 | ||
172776778 | CSUST_GXL | D1 | Sept. 20, 2022, 2:27 a.m. | OK | GNU C++14 | TESTS | 15 | 0 | 0 | ||
172775181 | SSilhouettes | D1 | Sept. 20, 2022, 1:55 a.m. | OK | GNU C++14 | TESTS | 15 | 0 | 0 | ||
172774746 | lc4337 | D1 | Sept. 20, 2022, 1:45 a.m. | OK | GNU C++14 | TESTS | 15 | 0 | 0 | ||
172772603 | Higanbana | D1 | Sept. 20, 2022, 1:02 a.m. | OK | GNU C++14 | TESTS | 15 | 0 | 0 | ||
172768527 | Pysu | D1 | Sept. 19, 2022, 10:49 p.m. | OK | GNU C++14 | TESTS | 15 | 0 | 0 | ||
172743042 | emacsANDvim | D1 | Sept. 19, 2022, 5:12 p.m. | OK | GNU C++14 | TESTS | 15 | 0 | 0 | ||
172740911 | niyiqi | D1 | Sept. 19, 2022, 5:03 p.m. | OK | GNU C++14 | TESTS | 15 | 0 | 0 | ||
172783382 | Nikhil_1709_ | D1 | Sept. 20, 2022, 4:29 a.m. | OK | GNU C++14 | TESTS | 15 | 0 | 102400 | ||
172780080 | wuxinwuqing | D1 | Sept. 20, 2022, 3:28 a.m. | OK | GNU C++14 | TESTS | 15 | 0 | 102400 | ||
172776352 | jdurie | D1 | Sept. 20, 2022, 2:18 a.m. | OK | GNU C++17 | TESTS | 15 | 0 | 0 | ||
172774909 | Su_Zipei | D1 | Sept. 20, 2022, 1:49 a.m. | OK | GNU C++17 | TESTS | 15 | 0 | 0 | ||
172761932 | Wolowitz | D1 | Sept. 19, 2022, 8:25 p.m. | OK | GNU C++17 | TESTS | 15 | 0 | 0 | ||
172756389 | ManasKhare | D1 | Sept. 19, 2022, 7:09 p.m. | OK | GNU C++17 | TESTS | 15 | 0 | 0 | ||
172754406 | alysonNBS | D1 | Sept. 19, 2022, 6:47 p.m. | OK | GNU C++17 | TESTS | 15 | 0 | 0 | ||
172750119 | Snapper_001 | D1 | Sept. 19, 2022, 6:05 p.m. | OK | GNU C++17 | TESTS | 15 | 0 | 0 | ||
172748802 | xbdhshshs | D1 | Sept. 19, 2022, 5:54 p.m. | OK | GNU C++17 | TESTS | 15 | 0 | 0 | ||
172747474 | amuss | D1 | Sept. 19, 2022, 5:43 p.m. | OK | GNU C++17 | TESTS | 15 | 0 | 0 | ||
172742726 | setulovelegend | D1 | Sept. 19, 2022, 5:11 p.m. | OK | GNU C++17 | TESTS | 15 | 0 | 0 | ||
172789465 | CAELO | D1 | Sept. 20, 2022, 5:58 a.m. | OK | GNU C++17 | TESTS | 15 | 0 | 102400 | ||
172787192 | killer_queen4804 | D1 | Sept. 20, 2022, 5:27 a.m. | OK | GNU C++17 (64) | TESTS | 15 | 0 | 0 | ||
172783327 | Jakon | D1 | Sept. 20, 2022, 4:28 a.m. | OK | GNU C++17 (64) | TESTS | 15 | 0 | 0 | ||
172775479 | chenmoooo | D1 | Sept. 20, 2022, 2:01 a.m. | OK | GNU C++17 (64) | TESTS | 15 | 0 | 0 | ||
172773658 | ZhouSai | D1 | Sept. 20, 2022, 1:22 a.m. | OK | GNU C++17 (64) | TESTS | 15 | 0 | 0 | ||
172773264 | retard_qwq | D1 | Sept. 20, 2022, 1:14 a.m. | OK | GNU C++17 (64) | TESTS | 15 | 0 | 0 | ||
172771565 | Liam_Evander | D1 | Sept. 20, 2022, 12:39 a.m. | OK | GNU C++17 (64) | TESTS | 15 | 0 | 0 | ||
172746461 | Hantek | D1 | Sept. 19, 2022, 5:35 p.m. | OK | GNU C++17 (64) | TESTS | 15 | 0 | 0 | ||
172744015 | er007 | D1 | Sept. 19, 2022, 5:18 p.m. | OK | GNU C++17 (64) | TESTS | 15 | 0 | 0 | ||
172781128 | zhangmj2008 | D1 | Sept. 20, 2022, 3:47 a.m. | OK | GNU C++17 (64) | TESTS | 15 | 0 | 102400 | ||
172771745 | Priyanshu_Gupta | D1 | Sept. 20, 2022, 12:42 a.m. | OK | GNU C++17 (64) | TESTS | 15 | 0 | 102400 |
Back to search problems