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.
Problems
B'Note that the only difference between String Transformation 1 and String Transformation 2 is in the move Koa does. In this version the letter y Koa selects can be any letter from the first 20 lowercase letters of English alphabet (read statement for better understanding). You can make hacks in these problems independently. Koa the Koala has two strings A and B of the same length n ( |A|=|B|=n ) consisting of the first 20 lowercase English alphabet letters (ie. from a to t). In one move Koa: Note that you can only modify letters in string A . Koa wants to know the smallest number of moves she has to do to make strings equal to each other ( A = B ) or to determine that there is no way to make them equal. Help her! Each test contains multiple test cases. The first line contains t ( 1 <= t <= 10 ) -- the number of test cases. Description of the test cases follows. The first line of each test case contains one integer n ( 1 <= n <= 10^5 ) -- the length of strings A and B . The second line of each test case contains string A ( |A|=n ). The third line of each test case contains string B ( |B|=n ). Both strings consists of the first 20 lowercase English alphabet letters (ie. from a to t). It is guaranteed that the sum of n over all test cases does not exceed 10^5 . For each test case: Print on a single line the smallest number of moves she has to do to make strings equal to each other ( A = B ) or -1 if there is no way to make them equal. '... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
87943950 |
rainboy |
C |
July 24, 2020, 9:45 p.m. |
OK |
GNU C11 |
TESTS |
70 |
685 |
5222400 |
|
|
88125144 |
xymtxdy |
C |
July 27, 2020, 12:19 p.m. |
OK |
GNU C++11 |
TESTS |
70 |
576 |
8294400 |
|
|
88023298 |
ohweonfire |
C |
July 26, 2020, 2:27 a.m. |
OK |
GNU C++11 |
TESTS |
70 |
592 |
5939200 |
|
|
87975165 |
atoiz |
C |
July 25, 2020, 9:35 a.m. |
OK |
GNU C++11 |
TESTS |
70 |
592 |
8601600 |
|
|
90502834 |
RainAir |
C |
Aug. 21, 2020, 2:34 a.m. |
OK |
GNU C++11 |
TESTS |
70 |
623 |
5427200 |
|
|
89839132 |
luogu_bot5 |
C |
Aug. 14, 2020, 3:58 a.m. |
OK |
GNU C++11 |
TESTS |
70 |
623 |
17203200 |
|
|
88037902 |
Frame233 |
C |
July 26, 2020, 7:57 a.m. |
OK |
GNU C++11 |
TESTS |
70 |
624 |
9318400 |
|
|
87918259 |
spacevortex |
C |
July 24, 2020, 4:20 p.m. |
OK |
GNU C++11 |
TESTS |
70 |
624 |
10137600 |
|
|
91010506 |
mwlc |
C |
Aug. 26, 2020, 2:14 a.m. |
OK |
GNU C++11 |
TESTS |
70 |
624 |
13312000 |
|
|
89845566 |
frodakcin |
C |
Aug. 14, 2020, 6:10 a.m. |
OK |
GNU C++11 |
TESTS |
70 |
624 |
69120000 |
|
|
88113492 |
18380120126 |
C |
July 27, 2020, 9:28 a.m. |
OK |
GNU C++11 |
TESTS |
70 |
639 |
5120000 |
|
|
91344783 |
yhx-12243 |
C |
Aug. 30, 2020, 1:14 p.m. |
OK |
GNU C++14 |
TESTS |
70 |
171 |
5120000 |
|
|
87926535 |
no_one_ |
C |
July 24, 2020, 5:06 p.m. |
OK |
GNU C++14 |
TESTS |
70 |
265 |
16896000 |
|
|
88686386 |
codepainter |
C |
Aug. 1, 2020, 6:09 p.m. |
OK |
GNU C++14 |
TESTS |
70 |
483 |
5324800 |
|
|
88129308 |
Rubblsh12345 |
C |
July 27, 2020, 1:14 p.m. |
OK |
GNU C++14 |
TESTS |
70 |
546 |
6041600 |
|
|
88131161 |
Minnakhmetov |
C |
July 27, 2020, 1:38 p.m. |
OK |
GNU C++14 |
TESTS |
70 |
561 |
5427200 |
|
|
88257999 |
lyuankai |
C |
July 29, 2020, 6:51 a.m. |
OK |
GNU C++14 |
TESTS |
70 |
608 |
5017600 |
|
|
88077121 |
nikolapesic2802 |
C |
July 26, 2020, 5:46 p.m. |
OK |
GNU C++14 |
TESTS |
70 |
623 |
6246400 |
|
|
88147044 |
clyring |
C |
July 27, 2020, 5:07 p.m. |
OK |
GNU C++14 |
TESTS |
70 |
624 |
5529600 |
|
|
89213621 |
nealchen |
C |
Aug. 7, 2020, 2:40 p.m. |
OK |
GNU C++14 |
TESTS |
70 |
639 |
5427200 |
|
|
88025363 |
Nero |
C |
July 26, 2020, 3:37 a.m. |
OK |
GNU C++14 |
TESTS |
70 |
639 |
8192000 |
|
|
87948781 |
ffao |
C |
July 25, 2020, 1:16 a.m. |
OK |
GNU C++17 |
TESTS |
70 |
249 |
12800000 |
|
|
88072914 |
Nakagawa.Kanon |
C |
July 26, 2020, 4:35 p.m. |
OK |
GNU C++17 |
TESTS |
70 |
327 |
4403200 |
|
|
88623593 |
peti1234 |
C |
July 31, 2020, 9:40 p.m. |
OK |
GNU C++17 |
TESTS |
70 |
390 |
12697600 |
|
|
87965728 |
I_Love_Tourist_ |
C |
July 25, 2020, 7:05 a.m. |
OK |
GNU C++17 |
TESTS |
70 |
499 |
8192000 |
|
|
88220667 |
VEGAnn |
C |
July 28, 2020, 4:06 p.m. |
OK |
GNU C++17 |
TESTS |
70 |
546 |
5324800 |
|
|
88082264 |
ezLadder |
C |
July 26, 2020, 7:22 p.m. |
OK |
GNU C++17 |
TESTS |
70 |
561 |
6860800 |
|
|
87991458 |
fedoseev.timofey |
C |
July 25, 2020, 1:51 p.m. |
OK |
GNU C++17 |
TESTS |
70 |
592 |
8396800 |
|
|
87990288 |
w0nsh |
C |
July 25, 2020, 1:36 p.m. |
OK |
GNU C++17 |
TESTS |
70 |
607 |
10444800 |
|
|
88092769 |
Kobin |
C |
July 27, 2020, 2:17 a.m. |
OK |
GNU C++17 |
TESTS |
70 |
608 |
10444800 |
|
|
87939074 |
snuke |
C |
July 24, 2020, 7:49 p.m. |
OK |
GNU C++17 |
TESTS |
70 |
623 |
8294400 |
|
|
87907584 |
aid |
C |
July 24, 2020, 3:51 p.m. |
OK |
GNU C++17 (64) |
TESTS |
70 |
171 |
18124800 |
|
|
88022308 |
neal |
C |
July 26, 2020, 1:42 a.m. |
OK |
GNU C++17 (64) |
TESTS |
70 |
249 |
4915200 |
|
|
87921225 |
yosupo |
C |
July 24, 2020, 4:27 p.m. |
OK |
GNU C++17 (64) |
TESTS |
70 |
405 |
8704000 |
|
|
88628521 |
Purple_wzy |
C |
Aug. 1, 2020, 2:05 a.m. |
OK |
GNU C++17 (64) |
TESTS |
70 |
561 |
10444800 |
|
|
88118179 |
cuizhuyefei |
C |
July 27, 2020, 10:40 a.m. |
OK |
GNU C++17 (64) |
TESTS |
70 |
561 |
20070400 |
|
|
89199828 |
mayaohua2003 |
C |
Aug. 7, 2020, 11:29 a.m. |
OK |
GNU C++17 (64) |
TESTS |
70 |
576 |
8704000 |
|
|
87923661 |
ecnerwala |
C |
July 24, 2020, 4:32 p.m. |
OK |
GNU C++17 (64) |
TESTS |
70 |
592 |
4812800 |
|
|
88006047 |
neal |
C |
July 25, 2020, 5:46 p.m. |
OK |
GNU C++17 (64) |
TESTS |
70 |
592 |
4915200 |
|
|
91124360 |
AuqaKyz |
C |
Aug. 27, 2020, 10:31 a.m. |
OK |
GNU C++17 (64) |
TESTS |
70 |
607 |
4403200 |
|
|
89075170 |
VLamarca |
C |
Aug. 5, 2020, 10:51 p.m. |
OK |
GNU C++17 (64) |
TESTS |
70 |
607 |
8806400 |
|
|
88116008 |
PizzaLovers007 |
C |
July 27, 2020, 10:07 a.m. |
OK |
Java 11 |
TESTS |
70 |
1060 |
23756800 |
|
|
88159887 |
MagentaCobra |
C |
July 27, 2020, 9:42 p.m. |
OK |
Java 8 |
TESTS |
70 |
1513 |
20582400 |
|
|
87928588 |
pichulia |
C |
July 24, 2020, 5:21 p.m. |
OK |
MS C++ 2017 |
TESTS |
70 |
1840 |
72601600 |
|
|
remove filters
Back to search problems