Find Jobs
Hire Freelancers

Rectangle_Area

$10-30 USD

In Progress
Posted almost 5 years ago

$10-30 USD

Paid on delivery
The task A 2D array of 0's and 1's is given. The array was filed with a sequence of correctly drawn rectangles of various sizes on different positions. Count the number of the remaining correctly drawn rectangles in the array and calculate the total area of their interiors. Input The first input line contains two integer M and N separated by space and specifying the number of rows and the number of columns in a 2D array which is on the next M lines. Each of next M lines contains N values which specify the contents of a row in the array, the values are separated by spaces. Each value is 0 or 1. It holds 5 ≤ M, N ≤ 1000. Output The output contains one text line with two integers separated by space. The first integer represents the number of correctly drawn rectangles in the input array. The second line represents the sum of areas of interiors of all correctly drawn retangles in the input array.
Project ID: 20087201

About the project

1 proposal
Remote project
Active 5 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs

About the client

Flag of CZECH REPUBLIC
Prague, Czech Republic
5.0
4
Payment method verified
Member since Jun 10, 2019

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.