ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1071. Nikifor 2

georgi_georgiev Faster Ideas [3] // Problem 1071. Nikifor 2 13 Aug 2009 05:26
I Solved this problem, by transforming x and y into every system and search for the longest common substring.
But I am interested in another Ideas, better than mine, except brute force.
Klyuchnikov Nikita Re: Faster Ideas [2] // Problem 1071. Nikifor 2 30 Aug 2009 15:58
it isn't necessary to search LCS (O(|x|*|y|)), you can check only what y is subsequence of x, so it will be O(|x|+|y|)

Edited by author 30.08.2009 16:00
Astekinane Re: Faster Ideas [1] // Problem 1071. Nikifor 2 29 Oct 2011 17:38
Verification of this fact is O(log(max(x,y)))
c_pp Re: Faster Ideas // Problem 1071. Nikifor 2 30 Dec 2016 00:39
base = 2..1000 bruteforce,  base > 1000  think a little :))