- I met this problem as a subproblem many times and tried to find a solution for it but failed ,So I make an elegent statement for the problem asking for someone's help :
# | User | Rating |
---|---|---|
1 | tourist | 3985 |
2 | jiangly | 3814 |
3 | jqdai0815 | 3682 |
4 | Benq | 3529 |
5 | orzdevinwang | 3526 |
6 | ksun48 | 3517 |
7 | Radewoosh | 3410 |
8 | hos.lyric | 3399 |
9 | ecnerwala | 3392 |
9 | Um_nik | 3392 |
# | User | Contrib. |
---|---|---|
1 | cry | 169 |
2 | maomao90 | 162 |
2 | Um_nik | 162 |
4 | atcoder_official | 161 |
5 | djm03178 | 158 |
6 | -is-this-fft- | 157 |
7 | adamant | 155 |
8 | awoo | 154 |
8 | Dominater069 | 154 |
10 | luogu_official | 150 |
In the last Codeforces Round 878 (Div. 3) I was trying to solve problem B using count subset sum function . 208751901
By generating a vector containing all the powers of 2 ,and search for how many different subsets such that their sum is less than or equal value k. It uses backtracking to explore all possible combinations of including or excluding each element in the subset. But as expected it gives me TLE as its time complexity is equal to (2^N) Each recursive call further branches into two recursive calls until the base cases are reached , This doubling effect results in an exponential time complexity. I am not exactly asking about problem B as I have already solved it . I am asking about how to implement this function with less time complexity using DP maybe O(n) , O(n^2) or even O(n^3) .
I am very sorry about this but it is clear that there are some problems from the latest contests whose solutions are offered for free on YouTube, and this has intensified recently, especially in the last 3 div2 contests and solutions to C,D problems have been published, and this exhausts a lot for the contestants under the rating of 1200 and 1300 , I will not paste the channel link so as not to spread more, but I hope that you will suggest me how to report these cheaters to codeforce officials to take strict action against them .
Name |
---|