Hey I participated in the Recent Div3 Contest. I was getting TLE at the Test Case3. I was confused where I did wrong. Please can anyone clarify where i did wrong. Any help would be helpful. Thankyou.

Before contest

Codeforces Round 940 (Div. 2) and CodeCraft-23

2 days

Register now »

Codeforces Round 940 (Div. 2) and CodeCraft-23

2 days

Register now »

*has extra registration

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

1 | ecnerwala | 3648 |

2 | Benq | 3580 |

3 | orzdevinwang | 3570 |

4 | cnnfls_csy | 3569 |

5 | Geothermal | 3568 |

6 | tourist | 3565 |

7 | maroonrk | 3530 |

8 | Radewoosh | 3520 |

9 | Um_nik | 3481 |

10 | jiangly | 3467 |

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

1 | maomao90 | 174 |

2 | adamant | 164 |

2 | awoo | 164 |

4 | TheScrasse | 160 |

5 | nor | 159 |

6 | maroonrk | 156 |

7 | -is-this-fft- | 150 |

8 | SecondThread | 147 |

9 | orz | 146 |

10 | pajenegod | 145 |

Hi I was wondering how to solve this question. The question actually came today in the weekly contest. The Question Name is -: 2952. Minimum Number of Coins to be Added . And my general approach was to just try recursion here and use pick and not pick approach to find out the element from 1 to Target. It's giving me wrong answer in the Tc -: [1,4,10] Target -: 19. My answer is 3 while the correct answer is 2. Can we try this approach to find out the answer. I know it will give the TLE but just for the practice purpose I want to try recursion here.

Submission Link -: https://leetcode.com/submissions/detail/1111336437/

Hi I was wondering why can't we use recursive Solution for Coin Piles Solution. This is the Problem

I have tried recursive solution but end up getting TLE and Runtime Error. Can anyone explain whether we can use Recursion or Dynamic Programing. This is my Solution.

Codeforces (c) Copyright 2010-2024 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Apr/19/2024 09:28:04 (k2).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|