can anyone please share his idea of solving problem 23E .

we are given a tree and we have to remove some edges from the tree (>=0) to maximize the product of sizes of connected components !

Before contest

Manthan, Codefest 19 (open for everyone, rated, Div. 1 + Div. 2)

37:07:20

Register now »

Manthan, Codefest 19 (open for everyone, rated, Div. 1 + Div. 2)

37:07:20

Register now »

*has extra registration

# | User | Rating |
---|---|---|

1 | tourist | 3645 |

2 | Radewoosh | 3403 |

3 | Um_nik | 3348 |

4 | LHiC | 3336 |

5 | Benq | 3316 |

6 | V--o_o--V | 3275 |

7 | mnbvmar | 3241 |

8 | yutaka1999 | 3190 |

9 | ainta | 3180 |

10 | Petr | 3106 |

# | User | Contrib. |
---|---|---|

1 | Errichto | 192 |

2 | Radewoosh | 177 |

3 | PikMike | 165 |

4 | rng_58 | 164 |

5 | Vovuh | 160 |

6 | majk | 158 |

7 | antontrygubO_o | 154 |

7 | 300iq | 154 |

9 | Um_nik | 151 |

10 | kostka | 149 |

can anyone please share his idea of solving problem 23E .

we are given a tree and we have to remove some edges from the tree (>=0) to maximize the product of sizes of connected components !

can anyone please explain how this problem will reduce to 0/1 Knapsack problem after increasing each t[i] by 1?

why we are increasing t[i] by 1 ?

Anyone who has solved problem E , please explain his approach .

the editorial says that first calculate cost for first level rows then do recalculation, but how to do it ? its quite unclear.

Upd:

What I thought is.. Suppose we have processed upto row no. x optimally and now processing x+1.

The calculation for the current row will not change the optimality of the row till x.

If we use this observation for the 1st row , We can optimally calculate the optimal cost to repaint the first row and make it in the form ABABAB....

Now... I got stuck from the 2nd row onwards..

What should we do to calculate the optimal cost for repainting from 2nd row to last row.

How should we process the column elements for a particular row ?

Upd 2:

Sol.`

Anyone who solve problem 16E, can please share his ideas.There is no official solution of this round. link

in the announcement thread it is mentioned that it will be solved using state compression dp , but what is state compression dp and what will be the dp state for this question ?

anyone who solved this problem http://codeforces.com/problemset/problem/12/D , can please share his ideas.

i have read this blog http://codeforces.com/blog/entry/44775#comment-437643 , the explanation which is written by

@satyaki3794 , how will it fit in time limit ?

**Can anyone who solved problem 7E share his ideas , how to solve it.**

Codeforces (c) Copyright 2010-2019 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Aug/24/2019 04:27:41 (h1).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|