https://www.codechef.com/problems/TREES

How to solve this one?detailed approach please.

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

1 | Benq | 3796 |

2 | tourist | 3722 |

3 | Radewoosh | 3719 |

4 | ecnerwala | 3578 |

5 | ksun48 | 3462 |

6 | Um_nik | 3456 |

7 | maroonrk | 3445 |

8 | jiangly | 3431 |

9 | Petr | 3370 |

10 | scott_wu | 3350 |

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

1 | 1-gon | 208 |

2 | awoo | 185 |

3 | rng_58 | 184 |

4 | Errichto | 182 |

5 | SecondThread | 177 |

5 | Radewoosh | 177 |

7 | maroonrk | 176 |

7 | -is-this-fft- | 176 |

9 | Um_nik | 173 |

10 | antontrygubO_o | 170 |

https://www.codechef.com/problems/TREES

How to solve this one?detailed approach please.

How to solve this simple problem?

You are given a tree of N vertices, and an integer K. How many ways are there to colour the tree with K colours such that no edge is adjacent to vertices of the same colour.

Since the answer may be large, output the answer modulo 1,000,000,007.

Please explain how did u arrive at the result?

i want an help beecause it is a difficult questions (sorry for mine poor english)

https://www.codechef.com/problems/SUBLCM need help in this problem.anyone to give a detailed explanation please?

Thanks in advance.

Somebody please give some good approach.

Codeforces (c) Copyright 2010-2021 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Jun/18/2021 03:49:19 (i1).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|