Plagiarism detection between two text files -- 2

Job ID: 35358432

Budget: ₹1,500 – ₹12,500 INR

The input files FILE1 and FILE2 are plaintext files. The tool should analyze these files in reasonable time (not more than 5 seconds, and file sizes will be no more than 500 kilobytes) and print 1 if it detects plagiarism and print 0 otherwise. The printing is done to standard input, and no other output should be produced by the program.
The program must use only built-in libraries that come with the language and must not rely on external libraries.
Rabin-Karp, Boyer Moore, KMP algorithms can also be used.

Language - CPP, Java and Python