Diane

medium
https://codeforces.com/contest/1554/problem/D

Input Format

Check the link

Output Format

Check the link

Constraints

Check the link

Example

Input
Check the link
Output
Check the link
Previous
String Polynomial Hashing
Next
Rabin Karp Pattern Find (spoj)

Related Questions