optimal parsing using dynamic programming

• Status: Closed
• Prize: \$25
• Entries Received: 2
• Winner: commaster90

Contest Brief

I need the program to get a list of numbers and make the optimal parse tree as following.
\$ ./myprogram 10 10 11 12 5 3 16 17 19 4 8
((x(x(xx)))((xx)(x(xx)))) 5562

5562 is scalar multipication.
the first 10 is the number of integer parameter.
10 11 12 5 3 16 17 19 4 8 are the numbers passing to the programming to build the tree.
I also need comments to understand how its been coded. thank you

Employer Feedback

“Communication with him is very good and easy.” liefde2010, Canada.

Public Clarification Board

• ingund
• 3 weeks ago

let's give another try .

• 3 weeks ago
• sakhawat2
• 3 weeks ago

10 10 11 12 5 3 16 17 19 4 8

From there, the integer inputs are:
10 11 12 5 3 16 17 19 4 8
There are 10 ints here.

The parse formula is:
((x(x(xx)))((xx)(x(xx))))
9 ints. Which 9 do we choose?

• 3 weeks ago
1. Contest Holder
• 3 weeks ago

Its based on the tree. U can see an example below.

• 3 weeks ago
• StrongDecs
• 3 weeks ago

#increaseprize

• 3 weeks ago
1. Contest Holder
• 3 weeks ago

How much?
How long does it take?

• 3 weeks ago
2. StrongDecs
• 3 weeks ago

I could describe my experience over similar tree development in the private messages, let's message to discuss the details

• 3 weeks ago
• ingund
• 4 weeks ago

Hi , I would like to help you but I can't understand what is the formula:

\$ ./myprogram 10 10 11 12 5 3 16 17 19 4 8

((x(x(xx)))((xx)(x(xx)))) 5562
#1: ((11*(12*(5*3)))*((16*17)(19*(4*8)))) * 5562
#2: ((11(12(53)))((1617)(19(48)))) * 5562

how should be output?

Kind Regards

• 4 weeks ago
1. Contest Holder
• 4 weeks ago

((x(x(xx)))((xx)(x(xx)))) 5562
This is the result the program should print

• 4 weeks ago
2. Contest Holder
• 4 weeks ago

So ((x(x(xx)))((xx)(x(xx)))) is the way of parsing.
and 5562 is scalar multipication.

• 4 weeks ago

How to get started with contests

• Post Your Contest Quick and easy

• Get Tons of Entries From around the world

• Award the best entry Download the files - Easy!