Solved A, B;

Not sure I was supposed to use Z-function in B, though. :-/

 * A (2013-04-11): Поиск подстроки
 * B (2013-04-11): Строка с уникальными префиксами

Signed-off-by: Andrew Tselischev <andrewtselischev@gmail.com>