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

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education