Characterize a sub-square shape as an arranged pair of two cells ((x1,y1),(x2,y2)), indicating the upper left cell and base right cell (comprehensively) of a sub-square shape in a. Two sub-square shapes ((x1,y1),(x2,y2)) and ((x3,y3),(x4,y4)) have a similar example if and provided that the accompanying holds: they have a similar width (x2−x1=x4

Np Ms Office 365/Excel 2016 I Ntermed
1st Edition
ISBN:9781337508841
Author:Carey
Publisher:Carey
Chapter2: Formatting Workbook Text And Data
Section: Chapter Questions
Problem 1.5CP
icon
Related questions
Question

Please proper code and output screenshot else downvoted.

 

Characterize a sub-square shape as an arranged pair of two cells ((x1,y1),(x2,y2)), indicating the upper left cell and base right cell (comprehensively) of a sub-square shape in a. Two sub-square shapes ((x1,y1),(x2,y2)) and ((x3,y3),(x4,y4)) have a similar example if and provided that the accompanying holds: they have a similar width (x2−x1=x4−x3); they have a similar tallness (y2−y1=y4−y3); for each pair (i,j) where 0≤i≤x2−x1 and 0≤j≤y2−y1, the shade of cells (x1+i,y1+j) and (x3+i,y3+j) are equivalent. 

Count the number of conceivable batik shading mixes, with the end goal that the subrectangles ((ax,ay),(ax+r−1,ay+c−1)) and ((bx,by),(bx+r−1,by+c−1)) have a similar example. Output the appropriate response modulo 109+7. 

Input : The primary line contains five integers n, m, k, r, and c (1≤n,m≤109, 1≤k≤109, 1≤r≤min(106,n), 1≤c≤min(106,m)) — the size of the batik, the number of tones, and size of the sub-square shape. The subsequent line contains four integers hatchet, ay, bx, and by (1≤ax,bx≤n, 1≤ay,by≤m) — the upper left corners of the first and second sub-square shape. Both of the sub-square shapes given are inside the framework (1≤ax+r−1, bx+r−1≤n, 1≤ay+c−1, by+c−1≤m). 

Output :Output an integer signifying the number of conceivable batik shading mixes modulo 109+7.

Expert Solution
steps

Step by step

Solved in 4 steps with 1 images

Blurred answer
Recommended textbooks for you
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L
New Perspectives on HTML5, CSS3, and JavaScript
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:
9781305503922
Author:
Patrick M. Carey
Publisher:
Cengage Learning