Minimum path
1031D1900· candidate master1.5s256 MB⌨ stdin/stdout
Examples
Sample 1of 3
Input
4 2abcdbcdebcadbcde
Output
aaabcde
Sample 2of 3
Input
5 3bwwwzhrhdhsepspsqfafajbvw
Output
aaaepfafw
Sample 3of 3
Input
7 6ypnxnnppnxonpmnxanpouxnnpmudnhtdudunpmuduhpmutsnz
Output
aaaaaaadudsnz
58%
1031D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)