№ | Пользователь | Рейтинг |
---|---|---|
1 | tourist | 3985 |
2 | jiangly | 3741 |
3 | jqdai0815 | 3682 |
4 | Benq | 3529 |
5 | orzdevinwang | 3526 |
6 | ksun48 | 3489 |
7 | Radewoosh | 3483 |
8 | Kevin114514 | 3442 |
9 | ecnerwala | 3392 |
9 | Um_nik | 3392 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | cry | 169 |
2 | atcoder_official | 162 |
2 | maomao90 | 162 |
2 | Um_nik | 162 |
5 | djm03178 | 158 |
6 | -is-this-fft- | 157 |
7 | adamant | 155 |
8 | awoo | 154 |
8 | Dominater069 | 154 |
10 | nor | 150 |
Название |
---|
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 ;-)