Find Jobs
Hire Freelancers

Completion of the project and executing it in c++ -- 2

$10-30 USD

Completed
Posted over 7 years ago

$10-30 USD

Paid on delivery
Gift Swapathon Problem statement: You are given the numbers of gifts each child is swapping and, for each child, a ranked list of the M gifts to be swapped. The rankings range from 1 to M, with lower numbers representing higher preference. You must assign the gifts to the children such that you minimize the sum of the rankings for the assigned gifts (per the receiving child), subject to the following constraints: 1. Each gift must be assigned to exactly one child. 2. Each child must be assigned the same number of gifts they donate to the swapathon. 3. No child can be assigned a gift such that their ranking is greater than 0.75 * M. Important: the sum of the rankings should be the lowest value that is possible for the given input file. Input format: Plain text tab-delimited file with N + 1 rows, where N = number of children, and M + 2 columns, where M = total number of gifts to be swapped. The first row will be a header row including gift IDs and the first column will be a header column including each child’s ID. The second column will contain the number of gifts the given child is contributing. Each entry will have exactly one string (with no white space). Each row contains a ranking of the child’s preference, where 1 indicates highest preference and M indicates lowest. (Each rank is represented and no ties are allowed.) An example follows: Child num g1 g2 g3 g4 g5 C1 2 5 3 2 4 1 C2 1 5 1 4 2 3 C3 2 1 4 2 3 5 Output format: The output should be a plain text tab-delimited file. It should begin with ‘AllScores=x’, where x is the sum of the preference rankings for the assigned gifts. This should be followed by N + 1 rows, each consisting of M + 2 columns. The first row should be a header row with the gift IDs, in the same order as the input file. The first two columns should consist of each child’s ID and number of gifts contributed, in the same order as the input file. All other entries should be zero, unless the particular gift is assigned to the given child. In this case, the child’s preference rating for the gift should be given instead of zero. An example follows: AllScores=8 Child num g1 g2 g3 g4 g5 C1 2 0 0 2 0 1 C2 1 0 1 0 0 0 C3 2 1 0 0 3 0 This output indicates that C1 will be given g3 and g5, C2 will be given g2, and C3 will be given g1 and g4. Note that the number of gifts donated by the given child must match the number of non-zero entries in the remainder of the row. Also, there should be exactly one non-zero entry in each gift column. Finally, the sum of the entries for all gift columns should be equal to the ‘AllScores’ value given on the first line of the output.
Project ID: 12249439

About the project

5 proposals
Remote project
Active 7 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
Awarded to:
User Avatar
I am newer for freelancer.com but i have a lot of experience about C++ and programming. I can easily solve your problem.
$30 USD in 2 days
5.0 (4 reviews)
2.3
2.3
5 freelancers are bidding on average $36 USD for this job
User Avatar
I am very proficient in c and c++. I have 16 years c++ developing experience now, and have worked for more than 6 years. My work is online game developing, and mainly focus on server side, using c++ under linux environment. I used c++ to make many great projects, for example, I made the tools which can convert java files into c++ scripts, of course garbage collection included, this job is very similar to a compiler, and is very complex. I also made our own mobile game using c++, I can show you the demo of client, if you like. I am very proficient in java also. I have a very good review on Freelancer.com, I never miss a project once I accept the job, you can check my review. Trust me, please let expert help you.
$80 USD in 1 day
4.8 (125 reviews)
6.8
6.8

About the client

Flag of UNITED STATES
Saint Louis, United States
4.6
2
Payment method verified
Member since Nov 30, 2016

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.