cf/mirror

Substrings Sort

CF
988B1100· newbie1s256 MB⌨ stdin/stdout

Examples

Sample 1of 3
Input
5
a
aba
abacaba
ba
aba
Output
YES
a
ba
aba
aba
abacaba
Sample 2of 3
Input
5
a
abacaba
ba
aba
abab
Output
NO
Sample 3of 3
Input
3
qwerty
qwerty
qwerty
Output
YES
qwerty
qwerty
qwerty
988B.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)