Is there any way to tell the no of subsequences of a given string with all unique elements.. I had used recursion but gets TLE. anyone have any optimal answer?
№ | Пользователь | Рейтинг |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3823 |
3 | Benq | 3738 |
4 | Radewoosh | 3633 |
5 | jqdai0815 | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | ksun48 | 3390 |
10 | gamegame | 3386 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 157 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
9 | nor | 153 |
Is there any way to tell the no of subsequences of a given string with all unique elements.. I had used recursion but gets TLE. anyone have any optimal answer?
Название |
---|
use pnc
one step back again?
C had bad problem Statement:(
I will tag you after every good contest:),why that post got deleted
the owner of that post deleted the post.
if you want to have good contests, you need to solve more problems rated 1700+.
I am getting comfortable with 1800,then also I should do 1700?
no no. but i doubt if you are really comfortable with 1800 rated problems, else why is your rating hasn't increased yet.
It will incearse !! I know
i am unable to reply back on codeforces currently
it says-"daily quota of 3 recepeints exceeded"
Count the number of appearances of each character, let's store them in an array $$$c$$$, such that $$$c_1$$$ is the number of a's, $$$c_2$$$ is the number of b's, and so on. Now, for each character, we can either choose one of its appearances and add it into a subsequence, or not add the character at all. So we have $$$c_i+1$$$ possibilities for character $$$i$$$. Now we just multiply the number of possibilities for each character and we get the result.