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 an integer n and three strings a, b, c , each consisting of n lowercase Latin letters. Let a template be a string t consisting of n lowercase and/or uppercase Latin letters. The string s matches the template t if the following conditions hold for all i from 1 to n : Accordingly, the string doesn 't match the template if the condition doesn 't hold for at least one i . Determine whether there exists a template t such that the strings a and b match it, while the string c does not. The first line contains an integer t ( 1 <= t <= 1000 ) -- the number of test cases. The first line of each test case contains an integer n ( 1 <= n <= 20 ) -- the length of the given strings. The next three lines contain the strings a, b and c . Each string consists of exactly n lowercase Latin letters. For each testcase, print "YES" if there exists a template t such that the strings a and b match it, while the string c does not. Otherwise, print "NO". In the first test case, you can use the template "C". The first letter of strings a and b differ from 'c ', so they match the template. The first letter of string c equals 'c ', so it doesn 't match. In the third test case, you can use the template "CODEforces". '... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
242354307 |
_Ghoco_ |
A |
Jan. 18, 2024, 9:30 p.m. |
OK |
C# 10 |
TESTS |
2 |
46 |
0 |
|
|
242357389 |
bluemegane |
A |
Jan. 18, 2024, 11 p.m. |
OK |
C# 8 |
TESTS |
2 |
77 |
0 |
|
|
242336895 |
ncoder97 |
A |
Jan. 18, 2024, 6:01 p.m. |
OK |
Clang++17 Diagnostics |
TESTS |
2 |
30 |
0 |
|
|
242380502 |
66qi |
A |
Jan. 19, 2024, 5:53 a.m. |
OK |
Clang++17 Diagnostics |
TESTS |
2 |
31 |
0 |
|
|
242346738 |
bhaw_bhaw |
A |
Jan. 18, 2024, 7:32 p.m. |
OK |
Clang++17 Diagnostics |
TESTS |
2 |
46 |
0 |
|
|
242364027 |
lianhao |
A |
Jan. 19, 2024, 2:14 a.m. |
OK |
GNU C11 |
TESTS |
2 |
15 |
0 |
|
|
242331654 |
Sujal_715 |
A |
Jan. 18, 2024, 5:26 p.m. |
OK |
GNU C11 |
TESTS |
2 |
15 |
0 |
|
|
242329095 |
mdkhaledmhamud220 |
A |
Jan. 18, 2024, 5:10 p.m. |
OK |
GNU C11 |
TESTS |
2 |
15 |
0 |
|
|
242367166 |
Prappo_All_Nishat |
A |
Jan. 19, 2024, 3:11 a.m. |
OK |
GNU C11 |
TESTS |
2 |
15 |
0 |
|
|
242328095 |
roy.aavas |
A |
Jan. 18, 2024, 5:05 p.m. |
OK |
GNU C11 |
TESTS |
2 |
15 |
204800 |
|
|
242377875 |
vinhdangquoc729 |
A |
Jan. 19, 2024, 5:31 a.m. |
OK |
GNU C11 |
TESTS |
2 |
15 |
307200 |
|
|
242326534 |
legend479 |
A |
Jan. 18, 2024, 4:57 p.m. |
OK |
GNU C11 |
TESTS |
2 |
15 |
307200 |
|
|
242323583 |
Shreyas_Chougaonkar |
A |
Jan. 18, 2024, 4:46 p.m. |
OK |
GNU C11 |
TESTS |
2 |
15 |
307200 |
|
|
242372520 |
rejwoan145 |
A |
Jan. 19, 2024, 4:31 a.m. |
OK |
GNU C11 |
TESTS |
2 |
31 |
0 |
|
|
242377952 |
vinhdangquoc729 |
A |
Jan. 19, 2024, 5:31 a.m. |
OK |
GNU C11 |
TESTS |
2 |
31 |
307200 |
|
|
242380580 |
jojoking0210 |
A |
Jan. 19, 2024, 5:54 a.m. |
OK |
GNU C++17 |
TESTS |
2 |
0 |
0 |
|
|
242380525 |
saidpon |
A |
Jan. 19, 2024, 5:53 a.m. |
OK |
GNU C++17 |
TESTS |
2 |
0 |
0 |
|
|
242380124 |
VanKiet |
A |
Jan. 19, 2024, 5:50 a.m. |
OK |
GNU C++17 |
TESTS |
2 |
0 |
0 |
|
|
242380008 |
avacatocapt |
A |
Jan. 19, 2024, 5:49 a.m. |
OK |
GNU C++17 |
TESTS |
2 |
0 |
0 |
|
|
242379848 |
Halal_Hacker |
A |
Jan. 19, 2024, 5:48 a.m. |
OK |
GNU C++17 |
TESTS |
2 |
0 |
0 |
|
|
242379568 |
GPraveen |
A |
Jan. 19, 2024, 5:46 a.m. |
OK |
GNU C++17 |
TESTS |
2 |
0 |
0 |
|
|
242381259 |
Abdalrhman_Aboalela |
A |
Jan. 19, 2024, 6 a.m. |
OK |
GNU C++17 |
TESTS |
2 |
0 |
0 |
|
|
242381092 |
yiyi142857 |
A |
Jan. 19, 2024, 5:58 a.m. |
OK |
GNU C++17 |
TESTS |
2 |
0 |
0 |
|
|
242380740 |
agrawalpratham0222 |
A |
Jan. 19, 2024, 5:55 a.m. |
OK |
GNU C++17 |
TESTS |
2 |
0 |
0 |
|
|
242380718 |
kunal_91 |
A |
Jan. 19, 2024, 5:55 a.m. |
OK |
GNU C++17 |
TESTS |
2 |
0 |
0 |
|
|
242370608 |
diguo |
A |
Jan. 19, 2024, 4:03 a.m. |
OK |
GNU C++17 (64) |
TESTS |
2 |
0 |
0 |
|
|
242371185 |
HHAZ |
A |
Jan. 19, 2024, 4:11 a.m. |
OK |
GNU C++17 (64) |
TESTS |
2 |
0 |
0 |
|
|
242371678 |
abeeda_010 |
A |
Jan. 19, 2024, 4:19 a.m. |
OK |
GNU C++17 (64) |
TESTS |
2 |
0 |
0 |
|
|
242372479 |
21cs01033 |
A |
Jan. 19, 2024, 4:31 a.m. |
OK |
GNU C++17 (64) |
TESTS |
2 |
0 |
0 |
|
|
242375189 |
__zy__ |
A |
Jan. 19, 2024, 5:06 a.m. |
OK |
GNU C++17 (64) |
TESTS |
2 |
0 |
0 |
|
|
242374704 |
989 |
A |
Jan. 19, 2024, 5 a.m. |
OK |
GNU C++17 (64) |
TESTS |
2 |
0 |
0 |
|
|
242369664 |
hhhh1 |
A |
Jan. 19, 2024, 3:49 a.m. |
OK |
GNU C++17 (64) |
TESTS |
2 |
0 |
0 |
|
|
242369384 |
_TLP |
A |
Jan. 19, 2024, 3:45 a.m. |
OK |
GNU C++17 (64) |
TESTS |
2 |
0 |
0 |
|
|
242369035 |
190123 |
A |
Jan. 19, 2024, 3:40 a.m. |
OK |
GNU C++17 (64) |
TESTS |
2 |
0 |
0 |
|
|
242368960 |
paoxiaomo |
A |
Jan. 19, 2024, 3:39 a.m. |
OK |
GNU C++17 (64) |
TESTS |
2 |
0 |
0 |
|
|
242380764 |
DijkstraAlgorithm |
A |
Jan. 19, 2024, 5:55 a.m. |
OK |
GNU C++20 (64) |
TESTS |
2 |
0 |
0 |
|
|
242381334 |
mir183 |
A |
Jan. 19, 2024, 6 a.m. |
OK |
GNU C++20 (64) |
TESTS |
2 |
0 |
0 |
|
|
242381119 |
_brucewayne_ |
A |
Jan. 19, 2024, 5:59 a.m. |
OK |
GNU C++20 (64) |
TESTS |
2 |
0 |
0 |
|
|
242381109 |
gzukovik |
A |
Jan. 19, 2024, 5:59 a.m. |
OK |
GNU C++20 (64) |
TESTS |
2 |
0 |
0 |
|
|
242381104 |
deng_wo_ni_xi |
A |
Jan. 19, 2024, 5:59 a.m. |
OK |
GNU C++20 (64) |
TESTS |
2 |
0 |
0 |
|
|
242381064 |
hopskiprabbit |
A |
Jan. 19, 2024, 5:58 a.m. |
OK |
GNU C++20 (64) |
TESTS |
2 |
0 |
0 |
|
|
242381004 |
Joyfine_12 |
A |
Jan. 19, 2024, 5:58 a.m. |
OK |
GNU C++20 (64) |
TESTS |
2 |
0 |
0 |
|
|
242380983 |
nitishbishnoiinfo |
A |
Jan. 19, 2024, 5:57 a.m. |
OK |
GNU C++20 (64) |
TESTS |
2 |
0 |
0 |
|
|
242380658 |
zy_juan |
A |
Jan. 19, 2024, 5:55 a.m. |
OK |
GNU C++20 (64) |
TESTS |
2 |
0 |
0 |
|
|
242380627 |
Leon271314 |
A |
Jan. 19, 2024, 5:54 a.m. |
OK |
GNU C++20 (64) |
TESTS |
2 |
0 |
0 |
|
|
242349365 |
kiruxan |
A |
Jan. 18, 2024, 8:02 p.m. |
OK |
Go |
TESTS |
2 |
15 |
102400 |
|
|
242334489 |
october_rain |
A |
Jan. 18, 2024, 5:43 p.m. |
OK |
Haskell |
TESTS |
2 |
15 |
0 |
|
|
242339837 |
mrizzzz_03 |
A |
Jan. 18, 2024, 6:24 p.m. |
OK |
Java 21 |
TESTS |
2 |
186 |
0 |
|
|
242339018 |
Festyve |
A |
Jan. 18, 2024, 6:17 p.m. |
OK |
Java 21 |
TESTS |
2 |
186 |
0 |
|
|
242372920 |
anht0n |
A |
Jan. 19, 2024, 4:37 a.m. |
OK |
Java 21 |
TESTS |
2 |
202 |
0 |
|
|
242371722 |
prakhar_30 |
A |
Jan. 19, 2024, 4:19 a.m. |
OK |
Java 21 |
TESTS |
2 |
202 |
0 |
|
|
242338964 |
believe18 |
A |
Jan. 18, 2024, 6:17 p.m. |
OK |
Java 21 |
TESTS |
2 |
202 |
0 |
|
|
242346327 |
java_noob69 |
A |
Jan. 18, 2024, 7:27 p.m. |
OK |
Java 21 |
TESTS |
2 |
202 |
15257600 |
|
|
242356643 |
anonymous2707 |
A |
Jan. 18, 2024, 10:36 p.m. |
OK |
Java 21 |
TESTS |
2 |
218 |
0 |
|
|
242355640 |
susvant |
A |
Jan. 18, 2024, 10:05 p.m. |
OK |
Java 21 |
TESTS |
2 |
218 |
0 |
|
|
242332934 |
DBD_2003 |
A |
Jan. 18, 2024, 5:34 p.m. |
OK |
Java 21 |
TESTS |
2 |
218 |
0 |
|
|
242334109 |
sohamt-21 |
A |
Jan. 18, 2024, 5:41 p.m. |
OK |
Java 21 |
TESTS |
2 |
233 |
0 |
|
|
242358630 |
rup.yes |
A |
Jan. 18, 2024, 11:39 p.m. |
OK |
Java 8 |
TESTS |
2 |
77 |
0 |
|
|
242362314 |
etian6795 |
A |
Jan. 19, 2024, 1:36 a.m. |
OK |
Java 8 |
TESTS |
2 |
93 |
0 |
|
|
242342722 |
Sumitsingh7 |
A |
Jan. 18, 2024, 6:49 p.m. |
OK |
Java 8 |
TESTS |
2 |
93 |
5836800 |
|
|
242333488 |
hardikgupta06 |
A |
Jan. 18, 2024, 5:37 p.m. |
OK |
Java 8 |
TESTS |
2 |
109 |
0 |
|
|
242330373 |
Light_Shot |
A |
Jan. 18, 2024, 5:18 p.m. |
OK |
Java 8 |
TESTS |
2 |
109 |
0 |
|
|
242351569 |
shreyasi_1 |
A |
Jan. 18, 2024, 8:34 p.m. |
OK |
Java 8 |
TESTS |
2 |
124 |
0 |
|
|
242338925 |
ChiragNayak |
A |
Jan. 18, 2024, 6:17 p.m. |
OK |
Java 8 |
TESTS |
2 |
124 |
0 |
|
|
242323653 |
fatma_jamal |
A |
Jan. 18, 2024, 4:46 p.m. |
OK |
Java 8 |
TESTS |
2 |
124 |
0 |
|
|
242327269 |
Yassinjan |
A |
Jan. 18, 2024, 5:01 p.m. |
OK |
Java 8 |
TESTS |
2 |
139 |
0 |
|
|
242378325 |
pranay_435 |
A |
Jan. 19, 2024, 5:35 a.m. |
OK |
Java 8 |
TESTS |
2 |
140 |
0 |
|
|
242375285 |
piyush138003 |
A |
Jan. 19, 2024, 5:07 a.m. |
OK |
MS C++ 2017 |
TESTS |
2 |
0 |
0 |
|
|
242375223 |
sunmircale1 |
A |
Jan. 19, 2024, 5:06 a.m. |
OK |
MS C++ 2017 |
TESTS |
2 |
0 |
0 |
|
|
242361106 |
aluckyboy |
A |
Jan. 19, 2024, 1:06 a.m. |
OK |
MS C++ 2017 |
TESTS |
2 |
0 |
0 |
|
|
242337690 |
AvanSingh |
A |
Jan. 18, 2024, 6:07 p.m. |
OK |
MS C++ 2017 |
TESTS |
2 |
0 |
0 |
|
|
242378986 |
piyush138003 |
A |
Jan. 19, 2024, 5:40 a.m. |
OK |
MS C++ 2017 |
TESTS |
2 |
15 |
0 |
|
|
242369957 |
vedant_2720 |
A |
Jan. 19, 2024, 3:53 a.m. |
OK |
MS C++ 2017 |
TESTS |
2 |
15 |
0 |
|
|
242361477 |
aluckyboy |
A |
Jan. 19, 2024, 1:15 a.m. |
OK |
MS C++ 2017 |
TESTS |
2 |
15 |
0 |
|
|
242360404 |
Pandit_Jwalit |
A |
Jan. 19, 2024, 12:44 a.m. |
OK |
MS C++ 2017 |
TESTS |
2 |
15 |
0 |
|
|
242353413 |
vishvjoshi |
A |
Jan. 18, 2024, 9:10 p.m. |
OK |
MS C++ 2017 |
TESTS |
2 |
15 |
0 |
|
|
242330264 |
DonSilvio |
A |
Jan. 18, 2024, 5:17 p.m. |
OK |
MS C++ 2017 |
TESTS |
2 |
15 |
0 |
|
|
242323764 |
mcb1303 |
A |
Jan. 18, 2024, 4:46 p.m. |
OK |
PyPy 3 |
TESTS |
2 |
171 |
4403200 |
|
|
242360611 |
xiaofanxian810 |
A |
Jan. 19, 2024, 12:50 a.m. |
OK |
PyPy 3 |
TESTS |
2 |
202 |
6348800 |
|
|
242352548 |
gardengnome |
A |
Jan. 18, 2024, 8:52 p.m. |
OK |
PyPy 3-64 |
TESTS |
2 |
46 |
1740800 |
|
|
242326529 |
master_JD |
A |
Jan. 18, 2024, 4:57 p.m. |
OK |
PyPy 3-64 |
TESTS |
2 |
61 |
2150400 |
|
|
242332185 |
V_I_P |
A |
Jan. 18, 2024, 5:29 p.m. |
OK |
PyPy 3-64 |
TESTS |
2 |
62 |
2048000 |
|
|
242324196 |
KAMITO |
A |
Jan. 18, 2024, 4:48 p.m. |
OK |
PyPy 3-64 |
TESTS |
2 |
62 |
3379200 |
|
|
242325180 |
fatalerror |
A |
Jan. 18, 2024, 4:52 p.m. |
OK |
PyPy 3-64 |
TESTS |
2 |
77 |
2252800 |
|
|
242343401 |
Quick-One |
A |
Jan. 18, 2024, 6:55 p.m. |
OK |
PyPy 3-64 |
TESTS |
2 |
77 |
2457600 |
|
|
242342989 |
Deecey01 |
A |
Jan. 18, 2024, 6:51 p.m. |
OK |
PyPy 3-64 |
TESTS |
2 |
77 |
3072000 |
|
|
242374797 |
SilveryZz |
A |
Jan. 19, 2024, 5:01 a.m. |
OK |
PyPy 3-64 |
TESTS |
2 |
77 |
3174400 |
|
|
242363228 |
cybsbbb |
A |
Jan. 19, 2024, 1:57 a.m. |
OK |
PyPy 3-64 |
TESTS |
2 |
77 |
3174400 |
|
|
242338521 |
NitroSpear |
A |
Jan. 18, 2024, 6:13 p.m. |
OK |
PyPy 3-64 |
TESTS |
2 |
77 |
3276800 |
|
|
242333511 |
OLOGY |
A |
Jan. 18, 2024, 5:37 p.m. |
OK |
Python 2 |
TESTS |
2 |
30 |
0 |
|
|
242347359 |
sarthak22457 |
A |
Jan. 18, 2024, 7:40 p.m. |
OK |
Python 3 |
TESTS |
2 |
30 |
0 |
|
|
242347345 |
nuredinbederu10k |
A |
Jan. 18, 2024, 7:39 p.m. |
OK |
Python 3 |
TESTS |
2 |
30 |
0 |
|
|
242332467 |
oibela |
A |
Jan. 18, 2024, 5:31 p.m. |
OK |
Python 3 |
TESTS |
2 |
30 |
0 |
|
|
242331844 |
youknowwho05 |
A |
Jan. 18, 2024, 5:27 p.m. |
OK |
Python 3 |
TESTS |
2 |
30 |
0 |
|
|
242363546 |
atomworkplace1234 |
A |
Jan. 19, 2024, 2:03 a.m. |
OK |
Python 3 |
TESTS |
2 |
31 |
0 |
|
|
242362180 |
jimmiltongau |
A |
Jan. 19, 2024, 1:33 a.m. |
OK |
Python 3 |
TESTS |
2 |
31 |
0 |
|
|
242359915 |
celestes |
A |
Jan. 19, 2024, 12:27 a.m. |
OK |
Python 3 |
TESTS |
2 |
31 |
0 |
|
|
242355166 |
ascil.chtioui |
A |
Jan. 18, 2024, 9:52 p.m. |
OK |
Python 3 |
TESTS |
2 |
31 |
0 |
|
|
242352600 |
TanvirMahmud007 |
A |
Jan. 18, 2024, 8:53 p.m. |
OK |
Python 3 |
TESTS |
2 |
31 |
0 |
|
|
242332150 |
Wube |
A |
Jan. 18, 2024, 5:28 p.m. |
OK |
Python 3 |
TESTS |
2 |
31 |
0 |
|
|
242335733 |
0x81 |
A |
Jan. 18, 2024, 5:52 p.m. |
OK |
Ruby 3 |
TESTS |
2 |
467 |
819200 |
|
|
242351400 |
vstiff |
A |
Jan. 18, 2024, 8:32 p.m. |
OK |
Rust 2021 |
TESTS |
2 |
0 |
0 |
|
|
242344148 |
t1myrkq |
A |
Jan. 18, 2024, 7:03 p.m. |
OK |
Rust 2021 |
TESTS |
2 |
0 |
0 |
|
|
242361992 |
snamy520 |
A |
Jan. 19, 2024, 1:28 a.m. |
OK |
Rust 2021 |
TESTS |
2 |
15 |
0 |
|
|
242346316 |
emiliopeju |
A |
Jan. 18, 2024, 7:27 p.m. |
OK |
Rust 2021 |
TESTS |
2 |
15 |
0 |
|
|
242361934 |
snamy520 |
A |
Jan. 19, 2024, 1:26 a.m. |
OK |
Rust 2021 |
TESTS |
2 |
171 |
0 |
|
|
remove filters
Back to search problems