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'You are given two strings s and t , both of length n . Each character in both string is 'a ', 'b ' or 'c '. In one move, you can perform one of the following actions: You are allowed to perform an arbitrary amount of moves (possibly, zero). Can you change string s to make it equal to string t ? The first line contains a single integer q ( 1 <= q <= 10^4 ) -- the number of testcases. The first line of each testcase contains a single integer n ( 1 <= n <= 10^5 ) -- the length of strings s and t . The second line contains string s of length n . Each character is 'a ', 'b ' or 'c '. The third line contains string t of length n . Each character is 'a ', 'b ' or 'c '. The sum of n over all testcases doesn 't exceed 10^5 . For each testcase, print "YES" if you can change string s to make it equal to string t by performing an arbitrary amount of moves (possibly, zero). Otherwise, print "NO". '... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
160376369 |
Andrei_Kuz |
C |
June 12, 2022, 7:24 p.m. |
OK |
Clang++17 Diagnostics |
TESTS |
10 |
452 |
18944000 |
|
|
160365345 |
AnasHagras |
C |
June 12, 2022, 5:12 p.m. |
OK |
Clang++17 Diagnostics |
TESTS |
10 |
997 |
36659200 |
|
|
160370274 |
rainboy |
C |
June 12, 2022, 6 p.m. |
OK |
GNU C11 |
TESTS |
10 |
46 |
1638400 |
|
|
160357368 |
YOK |
C |
June 12, 2022, 4:33 p.m. |
OK |
GNU C11 |
TESTS |
10 |
61 |
1024000 |
|
|
160375724 |
1435730 |
C |
June 12, 2022, 7:14 p.m. |
OK |
GNU C11 |
TESTS |
10 |
1372 |
204800 |
|
|
160372505 |
GTrigger |
C |
June 12, 2022, 6:27 p.m. |
OK |
GNU C11 |
TESTS |
10 |
1419 |
204800 |
|
|
160397732 |
aman404found |
C |
June 13, 2022, 5:27 a.m. |
OK |
GNU C11 |
TESTS |
10 |
1575 |
204800 |
|
|
160384695 |
zwh1234 |
C |
June 12, 2022, 11:15 p.m. |
OK |
GNU C++14 |
TESTS |
10 |
15 |
204800 |
|
|
160362964 |
Mr_sang_a |
C |
June 12, 2022, 4:55 p.m. |
OK |
GNU C++14 |
TESTS |
10 |
15 |
204800 |
|
|
160359904 |
izumiQR |
C |
June 12, 2022, 4:39 p.m. |
OK |
GNU C++14 |
TESTS |
10 |
15 |
409600 |
|
|
160392719 |
brat |
C |
June 13, 2022, 3:49 a.m. |
OK |
GNU C++14 |
TESTS |
10 |
15 |
512000 |
|
|
160389483 |
ksm2002 |
C |
June 13, 2022, 2:29 a.m. |
OK |
GNU C++14 |
TESTS |
10 |
15 |
512000 |
|
|
160385192 |
MMSM |
C |
June 12, 2022, 11:41 p.m. |
OK |
GNU C++14 |
TESTS |
10 |
15 |
512000 |
|
|
160380767 |
guptapriyanshu2001 |
C |
June 12, 2022, 8:54 p.m. |
OK |
GNU C++14 |
TESTS |
10 |
15 |
512000 |
|
|
160380013 |
Nanu_Pandya |
C |
June 12, 2022, 8:36 p.m. |
OK |
GNU C++14 |
TESTS |
10 |
15 |
512000 |
|
|
160371663 |
adil_kira |
C |
June 12, 2022, 6:16 p.m. |
OK |
GNU C++14 |
TESTS |
10 |
15 |
512000 |
|
|
160369058 |
Social_Pointer |
C |
June 12, 2022, 5:46 p.m. |
OK |
GNU C++14 |
TESTS |
10 |
15 |
512000 |
|
|
160399801 |
D4nnyLee |
C |
June 13, 2022, 6:03 a.m. |
OK |
GNU C++17 |
TESTS |
10 |
15 |
204800 |
|
|
160399686 |
D4nnyLee |
C |
June 13, 2022, 6:01 a.m. |
OK |
GNU C++17 |
TESTS |
10 |
15 |
204800 |
|
|
160399738 |
D4nnyLee |
C |
June 13, 2022, 6:02 a.m. |
OK |
GNU C++17 |
TESTS |
10 |
15 |
204800 |
|
|
160357604 |
BeCadidateMasterIn2022 |
C |
June 12, 2022, 4:33 p.m. |
OK |
GNU C++17 |
TESTS |
10 |
15 |
409600 |
|
|
160395239 |
yangKF |
C |
June 13, 2022, 4:42 a.m. |
OK |
GNU C++17 |
TESTS |
10 |
15 |
512000 |
|
|
160399496 |
Aniket_Sukhija |
C |
June 13, 2022, 5:58 a.m. |
OK |
GNU C++17 |
TESTS |
10 |
15 |
512000 |
|
|
160398569 |
_seg_error_ |
C |
June 13, 2022, 5:43 a.m. |
OK |
GNU C++17 |
TESTS |
10 |
15 |
512000 |
|
|
160398301 |
King_Grogu |
C |
June 13, 2022, 5:38 a.m. |
OK |
GNU C++17 |
TESTS |
10 |
15 |
512000 |
|
|
160395543 |
hugemongo |
C |
June 13, 2022, 4:47 a.m. |
OK |
GNU C++17 |
TESTS |
10 |
15 |
512000 |
|
|
160395507 |
m23022002 |
C |
June 13, 2022, 4:46 a.m. |
OK |
GNU C++17 |
TESTS |
10 |
15 |
512000 |
|
|
160369415 |
OnMyZenith |
C |
June 12, 2022, 5:50 p.m. |
OK |
GNU C++17 (64) |
TESTS |
10 |
0 |
1740800 |
|
|
160387519 |
dufresne_1949 |
C |
June 13, 2022, 1:28 a.m. |
OK |
GNU C++17 (64) |
TESTS |
10 |
15 |
512000 |
|
|
160398660 |
sweetpotato2 |
C |
June 13, 2022, 5:45 a.m. |
OK |
GNU C++17 (64) |
TESTS |
10 |
15 |
512000 |
|
|
160392777 |
whohet |
C |
June 13, 2022, 3:50 a.m. |
OK |
GNU C++17 (64) |
TESTS |
10 |
15 |
512000 |
|
|
160367923 |
opPO |
C |
June 12, 2022, 5:35 p.m. |
OK |
GNU C++17 (64) |
TESTS |
10 |
15 |
512000 |
|
|
160367302 |
gqf123 |
C |
June 12, 2022, 5:29 p.m. |
OK |
GNU C++17 (64) |
TESTS |
10 |
15 |
512000 |
|
|
160365923 |
GunZaaN |
C |
June 12, 2022, 5:16 p.m. |
OK |
GNU C++17 (64) |
TESTS |
10 |
15 |
512000 |
|
|
160362973 |
Yash_Prakash |
C |
June 12, 2022, 4:56 p.m. |
OK |
GNU C++17 (64) |
TESTS |
10 |
15 |
512000 |
|
|
160361745 |
dark_legend |
C |
June 12, 2022, 4:48 p.m. |
OK |
GNU C++17 (64) |
TESTS |
10 |
15 |
512000 |
|
|
160387729 |
BhaTTa |
C |
June 13, 2022, 1:35 a.m. |
OK |
GNU C++17 (64) |
TESTS |
10 |
15 |
819200 |
|
|
160364185 |
MOVSES1 |
C |
June 12, 2022, 5:04 p.m. |
OK |
GNU C++20 (64) |
TESTS |
10 |
0 |
409600 |
|
|
160369015 |
all0fme |
C |
June 12, 2022, 5:46 p.m. |
OK |
GNU C++20 (64) |
TESTS |
10 |
0 |
614400 |
|
|
160392024 |
ramakp34 |
C |
June 13, 2022, 3:33 a.m. |
OK |
GNU C++20 (64) |
TESTS |
10 |
15 |
409600 |
|
|
160383933 |
Metal_Sonic |
C |
June 12, 2022, 10:38 p.m. |
OK |
GNU C++20 (64) |
TESTS |
10 |
15 |
409600 |
|
|
160382587 |
AdC_AB2 |
C |
June 12, 2022, 9:46 p.m. |
OK |
GNU C++20 (64) |
TESTS |
10 |
15 |
409600 |
|
|
160395542 |
nishant_89 |
C |
June 13, 2022, 4:47 a.m. |
OK |
GNU C++20 (64) |
TESTS |
10 |
15 |
409600 |
|
|
160395568 |
nishant_89 |
C |
June 13, 2022, 4:48 a.m. |
OK |
GNU C++20 (64) |
TESTS |
10 |
15 |
409600 |
|
|
160395203 |
Mushfiq_Talha |
C |
June 13, 2022, 4:41 a.m. |
OK |
GNU C++20 (64) |
TESTS |
10 |
15 |
409600 |
|
|
160392590 |
ramakp34 |
C |
June 13, 2022, 3:46 a.m. |
OK |
GNU C++20 (64) |
TESTS |
10 |
15 |
409600 |
|
|
160392246 |
ramakp34 |
C |
June 13, 2022, 3:37 a.m. |
OK |
GNU C++20 (64) |
TESTS |
10 |
15 |
409600 |
|
|
160362847 |
koqo |
C |
June 12, 2022, 4:55 p.m. |
OK |
Go |
TESTS |
10 |
30 |
1024000 |
|
|
160362019 |
rdamir86 |
C |
June 12, 2022, 4:50 p.m. |
OK |
Go |
TESTS |
10 |
46 |
2457600 |
|
|
160390160 |
saga086 |
C |
June 13, 2022, 2:47 a.m. |
OK |
Java 11 |
TESTS |
10 |
170 |
0 |
|
|
160386683 |
jiomart |
C |
June 13, 2022, 12:53 a.m. |
OK |
Java 11 |
TESTS |
10 |
171 |
0 |
|
|
160374556 |
yaduahuja24 |
C |
June 12, 2022, 6:55 p.m. |
OK |
Java 11 |
TESTS |
10 |
186 |
0 |
|
|
160372993 |
freehandle |
C |
June 12, 2022, 6:33 p.m. |
OK |
Java 11 |
TESTS |
10 |
186 |
0 |
|
|
160365581 |
__Serendipity |
C |
June 12, 2022, 5:14 p.m. |
OK |
Java 11 |
TESTS |
10 |
186 |
0 |
|
|
160396155 |
eshan18.09 |
C |
June 13, 2022, 4:59 a.m. |
OK |
Java 11 |
TESTS |
10 |
187 |
0 |
|
|
160373465 |
weiweiwei_ |
C |
June 12, 2022, 6:40 p.m. |
OK |
Java 11 |
TESTS |
10 |
202 |
0 |
|
|
160363696 |
x21svage |
C |
June 12, 2022, 5 p.m. |
OK |
Java 11 |
TESTS |
10 |
217 |
0 |
|
|
160373119 |
revolio |
C |
June 12, 2022, 6:35 p.m. |
OK |
Java 11 |
TESTS |
10 |
249 |
0 |
|
|
160361188 |
hkhr108 |
C |
June 12, 2022, 4:45 p.m. |
OK |
Java 11 |
TESTS |
10 |
249 |
0 |
|
|
160368572 |
golions |
C |
June 12, 2022, 5:41 p.m. |
OK |
Java 8 |
TESTS |
10 |
93 |
0 |
|
|
160392950 |
vaibhav_1710 |
C |
June 13, 2022, 3:54 a.m. |
OK |
Java 8 |
TESTS |
10 |
124 |
0 |
|
|
160372797 |
harshsingla06 |
C |
June 12, 2022, 6:30 p.m. |
OK |
Java 8 |
TESTS |
10 |
155 |
0 |
|
|
160360925 |
dogranmol |
C |
June 12, 2022, 4:44 p.m. |
OK |
Java 8 |
TESTS |
10 |
155 |
0 |
|
|
160363180 |
leonlian |
C |
June 12, 2022, 4:57 p.m. |
OK |
Java 8 |
TESTS |
10 |
170 |
0 |
|
|
160390562 |
vipulm7 |
C |
June 13, 2022, 2:57 a.m. |
OK |
Java 8 |
TESTS |
10 |
171 |
0 |
|
|
160361179 |
liomsv |
C |
June 12, 2022, 4:45 p.m. |
OK |
Java 8 |
TESTS |
10 |
171 |
0 |
|
|
160358572 |
TimeToAct1on |
C |
June 12, 2022, 4:34 p.m. |
OK |
Java 8 |
TESTS |
10 |
171 |
0 |
|
|
160357037 |
TaukeKhan_ |
C |
June 12, 2022, 4:32 p.m. |
OK |
Java 8 |
TESTS |
10 |
171 |
0 |
|
|
160374296 |
vipulm7 |
C |
June 12, 2022, 6:52 p.m. |
OK |
Java 8 |
TESTS |
10 |
186 |
0 |
|
|
160393779 |
Agateth |
C |
June 13, 2022, 4:13 a.m. |
OK |
MS C++ 2017 |
TESTS |
10 |
46 |
2048000 |
|
|
160367118 |
Ma3str0 |
C |
June 12, 2022, 5:27 p.m. |
OK |
MS C++ 2017 |
TESTS |
10 |
46 |
9523200 |
|
|
160378893 |
Main_Slayer |
C |
June 12, 2022, 8:11 p.m. |
OK |
MS C++ 2017 |
TESTS |
10 |
61 |
1228800 |
|
|
160397717 |
WYW___ |
C |
June 13, 2022, 5:27 a.m. |
OK |
MS C++ 2017 |
TESTS |
10 |
62 |
2048000 |
|
|
160373500 |
1_shivam |
C |
June 12, 2022, 6:40 p.m. |
OK |
MS C++ 2017 |
TESTS |
10 |
951 |
204800 |
|
|
160358914 |
yk608521 |
C |
June 12, 2022, 4:34 p.m. |
OK |
MS C++ 2017 |
TESTS |
10 |
1372 |
409600 |
|
|
160363890 |
zeritonik |
C |
June 12, 2022, 5:01 p.m. |
OK |
MS C++ 2017 |
TESTS |
10 |
1419 |
204800 |
|
|
160360762 |
kagu |
C |
June 12, 2022, 4:43 p.m. |
OK |
PyPy 2 |
TESTS |
10 |
264 |
12185600 |
|
|
160377297 |
alonforces |
C |
June 12, 2022, 7:39 p.m. |
OK |
PyPy 2 |
TESTS |
10 |
343 |
10854400 |
|
|
160371199 |
Ayushman_123 |
C |
June 12, 2022, 6:11 p.m. |
OK |
PyPy 3 |
TESTS |
10 |
295 |
10240000 |
|
|
160382878 |
poof |
C |
June 12, 2022, 9:57 p.m. |
OK |
PyPy 3 |
TESTS |
10 |
1746 |
11161600 |
|
|
160385554 |
zmonster8 |
C |
June 12, 2022, 11:59 p.m. |
OK |
PyPy 3 |
TESTS |
10 |
1762 |
11161600 |
|
|
160372131 |
FlakeLCR |
C |
June 12, 2022, 6:22 p.m. |
OK |
PyPy 3-64 |
TESTS |
10 |
109 |
12390400 |
|
|
160361645 |
WitchOfTruth |
C |
June 12, 2022, 4:48 p.m. |
OK |
PyPy 3-64 |
TESTS |
10 |
171 |
13516800 |
|
|
160395524 |
ognr |
C |
June 13, 2022, 4:47 a.m. |
OK |
PyPy 3-64 |
TESTS |
10 |
171 |
16793600 |
|
|
160384742 |
raushnn |
C |
June 12, 2022, 11:18 p.m. |
OK |
PyPy 3-64 |
TESTS |
10 |
186 |
13107200 |
|
|
160369508 |
mayank35 |
C |
June 12, 2022, 5:51 p.m. |
OK |
PyPy 3-64 |
TESTS |
10 |
187 |
37171200 |
|
|
160361995 |
shiviDON |
C |
June 12, 2022, 4:50 p.m. |
OK |
PyPy 3-64 |
TESTS |
10 |
202 |
15872000 |
|
|
160361295 |
Divij12 |
C |
June 12, 2022, 4:46 p.m. |
OK |
PyPy 3-64 |
TESTS |
10 |
202 |
27955200 |
|
|
160386905 |
coconut99 |
C |
June 13, 2022, 1:03 a.m. |
OK |
PyPy 3-64 |
TESTS |
10 |
217 |
9625600 |
|
|
160391740 |
_N_0_0_B_ |
C |
June 13, 2022, 3:26 a.m. |
OK |
PyPy 3-64 |
TESTS |
10 |
217 |
11059200 |
|
|
160389702 |
Turtleeee |
C |
June 13, 2022, 2:35 a.m. |
OK |
PyPy 3-64 |
TESTS |
10 |
218 |
21094400 |
|
|
160364265 |
NS3081992 |
C |
June 12, 2022, 5:04 p.m. |
OK |
Python 3 |
TESTS |
10 |
170 |
512000 |
|
|
160368005 |
NS3081992 |
C |
June 12, 2022, 5:35 p.m. |
OK |
Python 3 |
TESTS |
10 |
171 |
512000 |
|
|
160368104 |
zunedz |
C |
June 12, 2022, 5:36 p.m. |
OK |
Python 3 |
TESTS |
10 |
186 |
2867200 |
|
|
160391542 |
harryPotterI |
C |
June 13, 2022, 3:22 a.m. |
OK |
Python 3 |
TESTS |
10 |
186 |
3891200 |
|
|
160375843 |
VibhorS |
C |
June 12, 2022, 7:16 p.m. |
OK |
Python 3 |
TESTS |
10 |
187 |
1638400 |
|
|
160370258 |
amarbudhiraja |
C |
June 12, 2022, 6 p.m. |
OK |
Python 3 |
TESTS |
10 |
202 |
8806400 |
|
|
160393690 |
md.pranta |
C |
June 13, 2022, 4:10 a.m. |
OK |
Python 3 |
TESTS |
10 |
202 |
10854400 |
|
|
160382297 |
Ele_1 |
C |
June 12, 2022, 9:38 p.m. |
OK |
Python 3 |
TESTS |
10 |
217 |
2150400 |
|
|
160389589 |
chemistry_guy |
C |
June 13, 2022, 2:32 a.m. |
OK |
Python 3 |
TESTS |
10 |
234 |
10854400 |
|
|
160372992 |
VioletVal |
C |
June 12, 2022, 6:33 p.m. |
OK |
Python 3 |
TESTS |
10 |
249 |
4710400 |
|
|
160393866 |
Thallium54 |
C |
June 13, 2022, 4:14 a.m. |
OK |
Rust 2021 |
TESTS |
10 |
15 |
4300800 |
|
|
160393944 |
Flavanoid |
C |
June 13, 2022, 4:16 a.m. |
OK |
Rust 2021 |
TESTS |
10 |
31 |
6553600 |
|
|
remove filters
Back to search problems