Find Jobs
Hire Freelancers

c++ program which can take generic inputs

₹600-1500 INR

In Progress
Posted over 3 years ago

₹600-1500 INR

Paid on delivery
9 natural numbers arranged in a 3x3 matrix: n11 n12 n13 n21 n22 n23 n31 n32 n33 numbers "in contact" with a given number to be those that appear closest to it on the same row, column or diagonally across: Contacts of number n11: n12, n22 and n21 Contacts of number n12: n11, n21, n22, n23, n13 The problem now is that numbers having a common factor (other than 1) should not be "in contact". In other words, a pair of numbers can remain neighbours only if their highest common factor is [login to view URL] to enforce "distancing": 1. The central number (n22) stays put. 2. The corner numbers (n11, n13, n33, n31) can move in same row or column or diagonally away from centre. 3. The numbers "on the walls" (n12, n23, n32, n21) can only move from the walls i.e. n21 can only move "left", n12 can only move "up", n23 can only move "right" and n32 can only move "down". 4. Each number should stay put as far as possible and the "distancing" operation should result in the least number of numbers ending up without any contacts. 5. After satisfying rule 4, if there are multiple options for the final matrix, then the "distancing" operation should result in the smallest (m x n matrix, including the intervening blank space elements, with the least possible value of m*n). 6. If, after satisfying all the rules above, there are multiple distancing options for a set of numbers, the largest num keeps its cell. Constraints 1 <= Element of grid <= 100 Input First line consists of 9 space separated integers denoting n11, n12, n13, ... n23, n33. Output Print the "contact" less numbers in ascending order of their value separated by space. Output "None" if there are no such numbers. Ex1 Input 23 33 12 1 2 5 25 6 10 Output 10 Explanation Initial configuration 23 33 12 1 2 5 25 6 10 The optimal distancing options result in the following possibility (space denoted by *): 23 33 * 12 1 2 5 * 25 * * * * 6 * 10 10 ends up as the number without contacts.
Project ID: 26907161

About the project

4 proposals
Remote project
Active 4 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
4 freelancers are bidding on average ₹2,588 INR for this job
User Avatar
i am c++ developer ping me I am a software and Web Developer. I hava also lot of experience in Designing. I have some rules and regulations before start of project: 1. Provide 100% work within deadline. 2. Provide unlimited revisions until employee satisfy 100% The area of experties are: 1. Java, JavaFX, JAVA( SWing), J2EE 2. PHP, HTML, CSS, BootStrap 3. MVC, C#, .NET 4. C/C++ Programming 5. Android Applications Developmet My main target is provide you a 100% work within your deadline and low budget. You get a good result after hiring me. So click award button for more discussion. Thanks
₹5,000 INR in 1 day
4.9 (59 reviews)
5.2
5.2
User Avatar
I have gone through the question and i have got the solution. Contact me for details. ACM ICPC Regionls ranked under 20. 5 star rating in Codechef. Expert Level in Codeforces. 1st in Inter Nit coding contest. I can implement the solution and give it you in an hour. Get in touch for more details.
₹1,500 INR in 1 day
4.9 (3 reviews)
2.5
2.5
User Avatar
Dear, Hope you will be doing well. We are working as a firm. We are equipped with a team from very diverse background. i.e., Engineers, Programmers, Circuit Designers, App Developers, Machine Learning Expert, AutoCAD Experts, Data Entry boys etc. After going through your project proposal, I want to let you know that we can help you with this project. We completed many such projects and will provide you with a quality work. Please contact once for further discussion. Thanks
₹3,000 INR in 7 days
0.0 (0 reviews)
1.6
1.6
User Avatar
Hii, I am a computer engineer. I can do it perfectly. Specifically I do this work 1 month ago. I think I can fulfill your requirements. For contact email me. Thank you
₹850 INR in 1 day
0.0 (0 reviews)
0.0
0.0

About the client

Flag of INDIA
Bengaluru, India
5.0
6
Payment method verified
Member since Jul 17, 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.