• + 0 comments

    import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.TreeSet;

    public class Solution { static TreeSett; public static void main(String[] args) { try{ BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); t=new TreeSet(); int n=Integer.parseInt(br.readLine()); for(int i=0;i }}catch(StringIndexOutOfBoundsException e){} len[j]=suffix[j].length()-count; lcp[j]=count; } int q=Integer.parseInt(br.readLine()); for(int i=0;i }catch(IOException e){ System.out.println(e);
    }

    }
    

    }