HAWKEYE AND FLOODFILL ⇾⚄ (EASY)
Practice
4.3 (119 votes)
Easy
Problem
86% Success 12540 Attempts 10 Points 1s Time Limit 256MB Memory 1024 KB Max Code

enter image description here
Hawkeye is a MARVEL character who has a perfect aim in archery. Its almost impossible for him to miss his aim. As you are the head of technical team at MARVEL , you have been assigned a very critical task. During practice hawkeye uses a square archery practice board. For our convenience we will assume it to be a N * N matrix. He shoots an arrow at position i,j with power P. Now power reduces by 1 as we move away from position i,j . Your task is to show the graph representing the impact of the arrow on the practice board.

INPUT FORMAT
First line of input contains a single integer N denoting the size of the practice board.
Second line contains 3 integers i,j denoting position at which arrow was shot and p denoting the power used to shoot the arrow.

OUTPUT FORMAT
Output a 2D matrix representing the impact on the practice board.

CONSTRAINS
1<=N<=1000
0<=i,j 0<=p<=109

Note:- The matrix is zero indexed matrix ie: first element will be at 0,0

Please login to use the editor

You need to be logged in to access the code editor

Loading...

Please wait while we load the editor

Loading...
Results
Custom Input
Run your code to see the output
Submissions
Please login to view your submissions
Similar Problems
Points:10
100 votes
Tags:
Easy
Points:10
12 votes
Tags:
StringBasic ProgrammingImplementation
Points:10
156 votes
Tags:
Basic ProgrammingBasics of ImplementationEasyImplementation