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 1098. Questions

Show all messages Hide all messages

How's that? FE, it seems to me, my solution works for O(logn), where n is the length of text and the base of logarithm is 1999/1998.
Igor, it seems wrong because your solution has exactly same asymptotical order.
O(ln X/ln(N/(N-1)) = O(ln X/(ln(1+1/N))= O(N*ln X)