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 n strings s_1, s_2, ... , s_n of length at most mathbf{8} . For each string s_i , determine if there exist two strings s_j and s_k such that s_i = s_j + s_k . That is, s_i is the concatenation of s_j and s_k . Note that j can be equal to k . Recall that the concatenation of strings s and t is s + t = s_1 s_2 ... s_p t_1 t_2 ... t_q , where p and q are the lengths of strings s and t respectively. For example, concatenation of "code" and "forces" is "codeforces". The first line contains a single integer t ( 1 <= q t <= q 10^4 ) -- the number of test cases. The first line of each test case contains a single integer n ( 1 <= q n <= q 10^5 ) -- the number of strings. Then n lines follow, the i -th of which contains non-empty string s_i of length at most mathbf{8} , consisting of lowercase English letters. Among the given n strings, there may be equal (duplicates). The sum of n over all test cases doesn 't exceed 10^5 . For each test case, output a binary string of length n . The i -th bit should be texttt{1} if there exist two strings s_j and s_k where s_i = s_j + s_k , and texttt{0} otherwise. Note that j can be equal to k . In the first test case, we have the following: '... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
163968278 |
szzz- |
D |
July 13, 2022, 1:27 a.m. |
OK |
C# 10 |
TESTS |
11 |
108 |
17100800 |
|
|
163965177 |
bluemegane |
D |
July 13, 2022, 12:24 a.m. |
OK |
C# 8 |
TESTS |
11 |
155 |
16588800 |
|
|
163965020 |
bluemegane |
D |
July 13, 2022, 12:20 a.m. |
OK |
C# 8 |
TESTS |
11 |
187 |
14540800 |
|
|
163982466 |
akaGlitch |
D |
July 13, 2022, 5 a.m. |
OK |
C# 8 |
TESTS |
11 |
436 |
21606400 |
|
|
163942144 |
easwarkilari |
D |
July 12, 2022, 5:51 p.m. |
OK |
GNU C++14 |
TESTS |
11 |
62 |
6348800 |
|
|
163980577 |
kartikeyyy |
D |
July 13, 2022, 4:34 a.m. |
OK |
GNU C++14 |
TESTS |
11 |
62 |
7168000 |
|
|
163971499 |
doraemon1146 |
D |
July 13, 2022, 2:19 a.m. |
OK |
GNU C++14 |
TESTS |
11 |
62 |
7270400 |
|
|
163952638 |
Coode_King |
D |
July 12, 2022, 7:32 p.m. |
OK |
GNU C++14 |
TESTS |
11 |
77 |
6348800 |
|
|
163979133 |
xkl1010 |
D |
July 13, 2022, 4:12 a.m. |
OK |
GNU C++14 |
TESTS |
11 |
77 |
7987200 |
|
|
163952437 |
csabby101 |
D |
July 12, 2022, 7:29 p.m. |
OK |
GNU C++14 |
TESTS |
11 |
78 |
6144000 |
|
|
163972985 |
..agzy |
D |
July 13, 2022, 2:41 a.m. |
OK |
GNU C++14 |
TESTS |
11 |
78 |
7475200 |
|
|
163970020 |
momomodalao |
D |
July 13, 2022, 1:55 a.m. |
OK |
GNU C++14 |
TESTS |
11 |
78 |
7475200 |
|
|
163937284 |
Kamranali |
D |
July 12, 2022, 5:18 p.m. |
OK |
GNU C++14 |
TESTS |
11 |
78 |
7884800 |
|
|
163937052 |
jasandeep |
D |
July 12, 2022, 5:16 p.m. |
OK |
GNU C++14 |
TESTS |
11 |
78 |
7884800 |
|
|
163937360 |
Jsnyen |
D |
July 12, 2022, 5:18 p.m. |
OK |
GNU C++17 |
TESTS |
11 |
46 |
6348800 |
|
|
163945929 |
dhara861 |
D |
July 12, 2022, 6:22 p.m. |
OK |
GNU C++17 |
TESTS |
11 |
46 |
7168000 |
|
|
163970897 |
TMQQ |
D |
July 13, 2022, 2:09 a.m. |
OK |
GNU C++17 |
TESTS |
11 |
46 |
107622400 |
|
|
163950773 |
rchurianov |
D |
July 12, 2022, 7:09 p.m. |
OK |
GNU C++17 |
TESTS |
11 |
62 |
4915200 |
|
|
163971770 |
Star-gazer |
D |
July 13, 2022, 2:23 a.m. |
OK |
GNU C++17 |
TESTS |
11 |
62 |
6348800 |
|
|
163969450 |
sjadin_moonwalker |
D |
July 13, 2022, 1:46 a.m. |
OK |
GNU C++17 |
TESTS |
11 |
62 |
6348800 |
|
|
163957309 |
max_d |
D |
July 12, 2022, 8:48 p.m. |
OK |
GNU C++17 |
TESTS |
11 |
62 |
6348800 |
|
|
163947625 |
_proton_ |
D |
July 12, 2022, 6:37 p.m. |
OK |
GNU C++17 |
TESTS |
11 |
62 |
6348800 |
|
|
163945524 |
anooprai.123 |
D |
July 12, 2022, 6:18 p.m. |
OK |
GNU C++17 |
TESTS |
11 |
62 |
6348800 |
|
|
163937358 |
raj24sahil |
D |
July 12, 2022, 5:18 p.m. |
OK |
GNU C++17 |
TESTS |
11 |
62 |
6348800 |
|
|
163977100 |
JustinRochester |
D |
July 13, 2022, 3:41 a.m. |
OK |
GNU C++17 (64) |
TESTS |
11 |
46 |
6963200 |
|
|
163963459 |
alwyn |
D |
July 12, 2022, 11:31 p.m. |
OK |
GNU C++17 (64) |
TESTS |
11 |
46 |
46284800 |
|
|
163973448 |
yaoveil |
D |
July 13, 2022, 2:48 a.m. |
OK |
GNU C++17 (64) |
TESTS |
11 |
62 |
46284800 |
|
|
163947764 |
Dkps0081 |
D |
July 12, 2022, 6:38 p.m. |
OK |
GNU C++17 (64) |
TESTS |
11 |
77 |
10854400 |
|
|
163947499 |
naveen_21tyagi |
D |
July 12, 2022, 6:36 p.m. |
OK |
GNU C++17 (64) |
TESTS |
11 |
78 |
9728000 |
|
|
163936479 |
Richw818 |
D |
July 12, 2022, 5:13 p.m. |
OK |
GNU C++17 (64) |
TESTS |
11 |
78 |
9830400 |
|
|
163970475 |
ebarbs |
D |
July 13, 2022, 2:03 a.m. |
OK |
GNU C++17 (64) |
TESTS |
11 |
78 |
22323200 |
|
|
163977117 |
JustinRochester |
D |
July 13, 2022, 3:42 a.m. |
OK |
GNU C++17 (64) |
TESTS |
11 |
93 |
7065600 |
|
|
163947657 |
naveen_21tyagi |
D |
July 12, 2022, 6:37 p.m. |
OK |
GNU C++17 (64) |
TESTS |
11 |
93 |
9728000 |
|
|
163947394 |
naveen_21tyagi |
D |
July 12, 2022, 6:35 p.m. |
OK |
GNU C++17 (64) |
TESTS |
11 |
93 |
9728000 |
|
|
163944146 |
Rom_Bog |
D |
July 12, 2022, 6:07 p.m. |
OK |
GNU C++20 (64) |
TESTS |
11 |
31 |
211865600 |
|
|
163944303 |
Rom_Bog |
D |
July 12, 2022, 6:08 p.m. |
OK |
GNU C++20 (64) |
TESTS |
11 |
46 |
111513600 |
|
|
163942877 |
Rom_Bog |
D |
July 12, 2022, 5:56 p.m. |
OK |
GNU C++20 (64) |
TESTS |
11 |
46 |
211660800 |
|
|
163948630 |
0.00 |
D |
July 12, 2022, 6:46 p.m. |
OK |
GNU C++20 (64) |
TESTS |
11 |
61 |
9216000 |
|
|
163954217 |
Kaatil |
D |
July 12, 2022, 7:52 p.m. |
OK |
GNU C++20 (64) |
TESTS |
11 |
62 |
9216000 |
|
|
163980475 |
sarthu858 |
D |
July 13, 2022, 4:32 a.m. |
OK |
GNU C++20 (64) |
TESTS |
11 |
62 |
9318400 |
|
|
163938015 |
CodingKnight |
D |
July 12, 2022, 5:22 p.m. |
OK |
GNU C++20 (64) |
TESTS |
11 |
62 |
10240000 |
|
|
163976865 |
WA_always |
D |
July 13, 2022, 3:38 a.m. |
OK |
GNU C++20 (64) |
TESTS |
11 |
62 |
10649600 |
|
|
163944398 |
Rom_Bog |
D |
July 12, 2022, 6:09 p.m. |
OK |
GNU C++20 (64) |
TESTS |
11 |
62 |
89907200 |
|
|
163977896 |
Nihao_A |
D |
July 13, 2022, 3:54 a.m. |
OK |
GNU C++20 (64) |
TESTS |
11 |
77 |
9216000 |
|
|
163948859 |
simulatte |
D |
July 12, 2022, 6:49 p.m. |
OK |
Go |
TESTS |
11 |
358 |
23244800 |
|
|
163943031 |
Death_on_2_Legs |
D |
July 12, 2022, 5:58 p.m. |
OK |
Haskell |
TESTS |
11 |
795 |
64102400 |
|
|
163977115 |
powervic08 |
D |
July 13, 2022, 3:42 a.m. |
OK |
Java 11 |
TESTS |
11 |
249 |
4710400 |
|
|
163974367 |
kamannb |
D |
July 13, 2022, 3:02 a.m. |
OK |
Java 11 |
TESTS |
11 |
249 |
6553600 |
|
|
163935041 |
gk_cool |
D |
July 12, 2022, 5:07 p.m. |
OK |
Java 11 |
TESTS |
11 |
280 |
5632000 |
|
|
163983486 |
Shantanu1058 |
D |
July 13, 2022, 5:13 a.m. |
OK |
Java 11 |
TESTS |
11 |
295 |
5939200 |
|
|
163939121 |
giridhrubajyoti2002 |
D |
July 12, 2022, 5:29 p.m. |
OK |
Java 11 |
TESTS |
11 |
296 |
5529600 |
|
|
163970955 |
aditya2024 |
D |
July 13, 2022, 2:10 a.m. |
OK |
Java 11 |
TESTS |
11 |
311 |
5939200 |
|
|
163944202 |
vinam1 |
D |
July 12, 2022, 6:07 p.m. |
OK |
Java 11 |
TESTS |
11 |
358 |
5120000 |
|
|
163980104 |
Maamoun2 |
D |
July 13, 2022, 4:27 a.m. |
OK |
Java 11 |
TESTS |
11 |
374 |
5529600 |
|
|
163946398 |
gla_191550071 |
D |
July 12, 2022, 6:25 p.m. |
OK |
Java 11 |
TESTS |
11 |
514 |
4403200 |
|
|
163940017 |
gurkaran_s |
D |
July 12, 2022, 5:35 p.m. |
OK |
Java 11 |
TESTS |
11 |
546 |
4915200 |
|
|
163981823 |
JunaidPathan |
D |
July 13, 2022, 4:53 a.m. |
OK |
Java 17 |
TESTS |
11 |
295 |
6553600 |
|
|
163953817 |
imvivekthakur |
D |
July 12, 2022, 7:47 p.m. |
OK |
Java 17 |
TESTS |
11 |
1434 |
6656000 |
|
|
163954030 |
imvivekthakur |
D |
July 12, 2022, 7:50 p.m. |
OK |
Java 17 |
TESTS |
11 |
1575 |
5836800 |
|
|
163941588 |
vasanthgk02 |
D |
July 12, 2022, 5:46 p.m. |
OK |
Java 17 |
TESTS |
11 |
1622 |
6656000 |
|
|
163941668 |
SmartHamster |
D |
July 12, 2022, 5:47 p.m. |
OK |
Java 17 |
TESTS |
11 |
1731 |
5836800 |
|
|
163938666 |
K-E |
D |
July 12, 2022, 5:26 p.m. |
OK |
Java 17 |
TESTS |
11 |
1809 |
6553600 |
|
|
163936854 |
Ahmad_Hoseiny |
D |
July 12, 2022, 5:15 p.m. |
OK |
Java 8 |
TESTS |
11 |
171 |
4198400 |
|
|
163941562 |
MovingBit |
D |
July 12, 2022, 5:46 p.m. |
OK |
Java 8 |
TESTS |
11 |
186 |
4300800 |
|
|
163952723 |
rish1896 |
D |
July 12, 2022, 7:33 p.m. |
OK |
Java 8 |
TESTS |
11 |
202 |
3072000 |
|
|
163949554 |
Youssef1Shawky |
D |
July 12, 2022, 6:56 p.m. |
OK |
Java 8 |
TESTS |
11 |
202 |
3379200 |
|
|
163976948 |
whyucode |
D |
July 13, 2022, 3:39 a.m. |
OK |
Java 8 |
TESTS |
11 |
202 |
3891200 |
|
|
163970605 |
Loomak |
D |
July 13, 2022, 2:05 a.m. |
OK |
Java 8 |
TESTS |
11 |
202 |
4198400 |
|
|
163936540 |
vaibhav_1710 |
D |
July 12, 2022, 5:14 p.m. |
OK |
Java 8 |
TESTS |
11 |
218 |
2969600 |
|
|
163935093 |
bai-ing |
D |
July 12, 2022, 5:07 p.m. |
OK |
Java 8 |
TESTS |
11 |
218 |
4710400 |
|
|
163937441 |
HideBeyondYou |
D |
July 12, 2022, 5:18 p.m. |
OK |
Java 8 |
TESTS |
11 |
218 |
4812800 |
|
|
163953047 |
Etheric_Wanderer |
D |
July 12, 2022, 7:37 p.m. |
OK |
Java 8 |
TESTS |
11 |
233 |
3379200 |
|
|
163973271 |
qihnus |
D |
July 13, 2022, 2:45 a.m. |
OK |
Kotlin 1.6 |
TESTS |
11 |
311 |
7270400 |
|
|
163973626 |
pursuita |
D |
July 13, 2022, 2:51 a.m. |
OK |
MS C++ 2017 |
TESTS |
11 |
187 |
16076800 |
|
|
163938673 |
OmarRnr |
D |
July 12, 2022, 5:26 p.m. |
OK |
MS C++ 2017 |
TESTS |
11 |
343 |
16998400 |
|
|
163950226 |
alcogoliki |
D |
July 12, 2022, 7:03 p.m. |
OK |
MS C++ 2017 |
TESTS |
11 |
499 |
6246400 |
|
|
163936879 |
ca3sar1204 |
D |
July 12, 2022, 5:16 p.m. |
OK |
PyPy 3 |
TESTS |
11 |
233 |
19353600 |
|
|
163935626 |
gojo57 |
D |
July 12, 2022, 5:10 p.m. |
OK |
PyPy 3 |
TESTS |
11 |
264 |
12800000 |
|
|
163939597 |
hritik3878 |
D |
July 12, 2022, 5:32 p.m. |
OK |
PyPy 3 |
TESTS |
11 |
265 |
29593600 |
|
|
163936997 |
grawlixes |
D |
July 12, 2022, 5:16 p.m. |
OK |
PyPy 3 |
TESTS |
11 |
280 |
11264000 |
|
|
163962019 |
mficco |
D |
July 12, 2022, 10:43 p.m. |
OK |
PyPy 3 |
TESTS |
11 |
841 |
16793600 |
|
|
163947847 |
sky9313 |
D |
July 12, 2022, 6:39 p.m. |
OK |
PyPy 3 |
TESTS |
11 |
842 |
11059200 |
|
|
163939595 |
Srilekha3 |
D |
July 12, 2022, 5:32 p.m. |
OK |
PyPy 3 |
TESTS |
11 |
842 |
13516800 |
|
|
163942382 |
dawitys010 |
D |
July 12, 2022, 5:52 p.m. |
OK |
PyPy 3 |
TESTS |
11 |
858 |
11673600 |
|
|
163939264 |
ferdylimm9 |
D |
July 12, 2022, 5:30 p.m. |
OK |
PyPy 3 |
TESTS |
11 |
872 |
12288000 |
|
|
163941029 |
Jguerra47 |
D |
July 12, 2022, 5:42 p.m. |
OK |
PyPy 3 |
TESTS |
11 |
873 |
12697600 |
|
|
163977049 |
mrng |
D |
July 13, 2022, 3:40 a.m. |
OK |
PyPy 3-64 |
TESTS |
11 |
139 |
15769600 |
|
|
163958000 |
biglunchdude |
D |
July 12, 2022, 9:02 p.m. |
OK |
PyPy 3-64 |
TESTS |
11 |
140 |
17510400 |
|
|
163956572 |
henok3878 |
D |
July 12, 2022, 8:32 p.m. |
OK |
PyPy 3-64 |
TESTS |
11 |
155 |
13312000 |
|
|
163952602 |
dalgu |
D |
July 12, 2022, 7:31 p.m. |
OK |
PyPy 3-64 |
TESTS |
11 |
155 |
13721600 |
|
|
163964949 |
wanglijie |
D |
July 13, 2022, 12:18 a.m. |
OK |
PyPy 3-64 |
TESTS |
11 |
155 |
14643200 |
|
|
163941449 |
mayank35 |
D |
July 12, 2022, 5:46 p.m. |
OK |
PyPy 3-64 |
TESTS |
11 |
155 |
14950400 |
|
|
163978204 |
kojihashimoto |
D |
July 13, 2022, 3:58 a.m. |
OK |
PyPy 3-64 |
TESTS |
11 |
171 |
16281600 |
|
|
163935562 |
alexwice |
D |
July 12, 2022, 5:09 p.m. |
OK |
PyPy 3-64 |
TESTS |
11 |
187 |
14745600 |
|
|
163937850 |
ek4407 |
D |
July 12, 2022, 5:21 p.m. |
OK |
PyPy 3-64 |
TESTS |
11 |
202 |
17305600 |
|
|
163940012 |
bjy |
D |
July 12, 2022, 5:35 p.m. |
OK |
PyPy 3-64 |
TESTS |
11 |
202 |
20275200 |
|
|
163983148 |
iwillgo |
D |
July 13, 2022, 5:09 a.m. |
OK |
Python 3 |
TESTS |
11 |
296 |
5017600 |
|
|
163937970 |
alaa81313 |
D |
July 12, 2022, 5:21 p.m. |
OK |
Python 3 |
TESTS |
11 |
311 |
5939200 |
|
|
163983302 |
iwillgo |
D |
July 13, 2022, 5:10 a.m. |
OK |
Python 3 |
TESTS |
11 |
311 |
6656000 |
|
|
163948682 |
_rahul11_ |
D |
July 12, 2022, 6:47 p.m. |
OK |
Python 3 |
TESTS |
11 |
312 |
5632000 |
|
|
163935308 |
kostya2077 |
D |
July 12, 2022, 5:08 p.m. |
OK |
Python 3 |
TESTS |
11 |
327 |
5017600 |
|
|
163966366 |
srisri_j1 |
D |
July 13, 2022, 12:52 a.m. |
OK |
Python 3 |
TESTS |
11 |
327 |
5222400 |
|
|
163939216 |
sabidmahmud |
D |
July 12, 2022, 5:29 p.m. |
OK |
Python 3 |
TESTS |
11 |
327 |
5222400 |
|
|
163957759 |
techkitGlobal |
D |
July 12, 2022, 8:57 p.m. |
OK |
Python 3 |
TESTS |
11 |
342 |
5222400 |
|
|
163957735 |
rr745 |
D |
July 12, 2022, 8:57 p.m. |
OK |
Python 3 |
TESTS |
11 |
342 |
5222400 |
|
|
163940530 |
kiran057 |
D |
July 12, 2022, 5:38 p.m. |
OK |
Python 3 |
TESTS |
11 |
343 |
5017600 |
|
|
163948108 |
purojok |
D |
July 12, 2022, 6:41 p.m. |
OK |
Rust 2021 |
TESTS |
11 |
77 |
9318400 |
|
|
163940061 |
Ragib_Hasin |
D |
July 12, 2022, 5:35 p.m. |
OK |
Rust 2021 |
TESTS |
11 |
78 |
6656000 |
|
|
163950538 |
Hyrulia |
D |
July 12, 2022, 7:07 p.m. |
OK |
Rust 2021 |
TESTS |
11 |
156 |
9420800 |
|
|
remove filters
Back to search problems