Find Jobs
Hire Freelancers

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

$10-30 USD

Fullført
Lagt ut over 7 år siden

$10-30 USD

Betalt ved levering
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.
Prosjekt-ID: 12249439

Om prosjektet

5 forslag
Eksternt prosjekt
Aktiv 7 år siden

Ønsker du å tjene penger?

Fordeler med budgivning på Freelancer

Angi budsjettet og tidsrammen
Få betalt for arbeidet ditt
Skisser forslaget ditt
Det er gratis å registrere seg og by på jobber
Tildelt til:
Brukeravatar
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 om 2 dager
5,0 (4 omtaler)
2,3
2,3
5 frilansere byr i gjennomsnitt $36 USD for denne jobben
Brukeravatar
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 om 1 dag
4,8 (125 omtaler)
6,8
6,8

Om klienten

UNITED STATESs flagg
Saint Louis, United States
4,6
2
Betalingsmetode bekreftet
Medlem siden nov. 30, 2016

Klientbekreftelse

Takk! Vi har sendt deg en lenke for at du skal kunne kreve din gratis kreditt.
Noe gikk galt. Vær så snill, prøv på nytt.
Registrerte brukere Publiserte jobber
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Forhåndsvisning innlasting
Tillatelse gitt for geolokalisering.
Påloggingsøkten din er utløpt og du har blitt logget ut. Logg på igjen.