№ | Пользователь | Рейтинг |
---|---|---|
1 | tourist | 3993 |
2 | jiangly | 3743 |
3 | orzdevinwang | 3707 |
4 | Radewoosh | 3627 |
5 | jqdai0815 | 3620 |
6 | Benq | 3564 |
7 | Kevin114514 | 3443 |
8 | ksun48 | 3434 |
9 | Rewinding | 3397 |
10 | Um_nik | 3396 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 155 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
10 | nor | 152 |
Название |
---|
can anybody propose a solution for qualification round's 2nd problem for small dataset.
Here is what i did and passed both the tests.. initially for each test case set count=0; Scan the scores of googlers one by one in a variable say 't'
do this for all the scores and then print the final count for the test case.....
i hope you understood the approach.
Let
dp[i][j]
is the answer for exactlyi
dancers andj
surprising scores. Initialization:dp[0][0] = 0
. Try to add a new dancer.If the best result of at least
p
is reachable, updatedp[i+1][j] = max(dp[i+1][j], dp[i][j]+1)
. If not, updatedp[i+1][j] = max(dp[i+1][j], dp[i][j])
.And if this result can be also surprising, update
dp[i+1][j+1] = max(dp[i+1][j+1], dp[i][j]+1)
. If not, updatedp[i+1][j+1] = max(dp[i+1][j+1], dp[i][j])
.At the end answer will be in
dp[n][s]
.I don't know why people Downvoted my post even though it works....i got AC on it...if anyone has any problem then ask... I think the thought process is simple and extra space also is not required as in DP solutiom..
Here is the Complete Code..
There is a lot of idiots on Codeforces who vote agains posts without clear reason. Don't mind.
I think you got minuses because what you wrote is not classified as idea or algorithm, but implementation details, thus it was very difficult to understand quickly.
Some statements to outline the algo like "the main idea is greedy", "for each contestant check if he is surprising" may help :)
Its probably because you are green just like me..Many people vote just by the color and not by the content :(
Is there any way so that i can see the results filtered by Country.....
Usually statistics are published here: http://www.go-hero.net/jam/11/
I think it will be http://www.go-hero.net/jam/12/ this year)
Statistics are updated ;-)