# Answer to Question #19284 in Quantitative Methods for Dilon

Question #19284

I want to program a question that is :

There are m integer strings of length 3 ( suppose all of them are positive and have length of 3 for example : 3 => 003 ) and they have either bonus(positive) or penalty(negative) for us , the problem is that give a string of lenth N that has a maximum bonus for us . Every subsequence that appears in the output string gives us either a bonus or penalty .

examples :

N = 5

356 20

674 -10

Output :

00356 ( 356 => 00356 )

another example :

N = 5

532 20

243 10

Output :

53243

There are m integer strings of length 3 ( suppose all of them are positive and have length of 3 for example : 3 => 003 ) and they have either bonus(positive) or penalty(negative) for us , the problem is that give a string of lenth N that has a maximum bonus for us . Every subsequence that appears in the output string gives us either a bonus or penalty .

examples :

N = 5

356 20

674 -10

Output :

00356 ( 356 => 00356 )

another example :

N = 5

532 20

243 10

Output :

53243

Expert's answer

Dear visitor

What programming language is needed? Please, give us the details so we could help you

What programming language is needed? Please, give us the details so we could help you

## Comments

## Leave a comment