Avoiding Plagiarism
Cody needs to write a report for his programming class this semester. The report is a string made up of the alphabets A, B, and C. The professor remembers all N reports submitted in the previous semester, and if a substring of the new report is one of the existing reports, it is immediately considered plagiarism.