Hacking Cypher

hard
https://codeforces.com/contest/490/problem/C

Input Format

Check Link

Output Format

Check Link

Constraints

Check Link

Example

Input
116401024
97 1024
Output
YES
11640
1024
Previous
Pattern Boundary
Next
Count Square Submatrices With All Ones

Related Questions