cf/mirror

Treasure Hunt

CF
979B1800· expert1s256 MB⌨ stdin/stdout
#greedy

Examples

Sample 1of 4
Input
3
Kuroo
Shiro
Katie
Output
Kuro
Sample 2of 4
Input
7
treasurehunt
threefriends
hiCodeforces
Output
Shiro
Sample 3of 4
Input
1
abcabc
cbabac
ababca
Output
Katie
Sample 4of 4
Input
15
foPaErcvJ
mZaxowpbt
mkuOlaHRE
Output
Draw
979B.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)