hiho week 218 register

Ended

Participants:159

Verdict:Time Limit Exceeded
Score:90 / 100
Submitted:2018-09-02 16:54:47

Lang:Java

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import java.util.*;
import java.io.*;
public class Main {
    public static char[] target;
    public static boolean[] mark;
    public static int[][] fail;
    public static char[][] keywords;
    public static void main(String[] argsthrows IOException{
        Reader.init(System.in);
        int n = Reader.nextInt();
        keywords = new char[n][];
        fail = new int[n][];
        for(int i = 0i < ni++){
            keywords[i= Reader.next().toCharArray();
            fail[i= new int[keywords[i].length + 1];
            getFail(i);
        }
        target = Reader.next().toCharArray();
        mark = new boolean[target.length];
        Arrays.fill(markfalse);
        for(int i = 0i < ni++)
            find(i0);
        for(int i = 0i < mark.lengthi++)
            target[i= mark[i] ? '*' : target[i];
        System.out.println(new String(target));
    }
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX