Felix Halim .NET  
University Experience
IOI 2002 Yong In, Korea
ACM ICPC Regional Manila 2003
ACM ICPC Regional Manila 2004
ACM ICPC Regional Manila 2005
ACM ICPC Regional Kaohsiung 2006
ACM ICPC Regional Singapore 2007
ACM ICPC Regional Jakarta 2008 (ext)
ACM ICPC Regional Jakarta 2009 (ext)
ACM ICPC Regional Jakarta 2010
ACM ICPC Regional Jakarta 2012  Problem H
ACM ICPC Regional Jakarta 2013  Problem J (new!)
ACM ICPC World Final Tokyo 2007
Google India Code Jam 2005
Google India Code Jam 2006
Indonesia National Contest 2007
Indonesia National Contest 2008
Indonesia National Contest 2010
Facebook Hacker Cup 2011


Problem StatementString S is a SPstring if some nonempty prefix of S is also a suffix of S. The prefix (the suffix) can't be the whole string. For example, strings "AA" and "ABCABC" are SPstrings, but strings "AB", "ABCB" are not. String S is a Nstring if it satisfies the following conditions:
For example, "ABBA" is a 2string because it contains only the first 2 letters of the alphabet, and both "ABBAA" and "ABBAB" are SPstrings. There is an infinite number of Nstrings, but in this problem we will consider only Nstrings of minimal length (that is, Nstrings of length L such that no Nstring of length less than L exists). You will be given two ints  N and K. Build all the shortest possible Nstrings and sort them alphabetically. Return the substring of the Kth string from index leftIdx (inclusive) to index rightIdx (exclusive). Return "" if the Kth string contains less than rightIdx characters or the Kth string doesn't exist. DefinitionClass: InterestingStrings Method: findSubstring Parameters: int, int, int, int Returns: string Method signature: string findSubstring(int N, int K, int leftIdx, int rightIdx) (be sure your method is public) Notes
Constraints
Examples0) 1 0 3 Returns: "BAB" 1) 1 0 0 1 Returns: "A" 2) 2 0 1 3 Returns: "BA" 3) 4 0 7 9 Returns: "DA" 4) 3 1 0 7 Returns: "ACABACA" 5) 5 1000 99999999 100000000 Returns: "" This problem statement is the exclusive and proprietary property of TopCoder, Inc. Any unauthorized use or reproduction of this information without the prior written consent of TopCoder, Inc. is strictly prohibited. (c)2003, TopCoder, Inc. All rights reserved. Google India Code Jam 2006  Table of Contents
