Привет всем!
ЗавтраСегодня в 19:00 MSK состоится Topcoder SRM 680.
Предлагаю обсудить задачи после контеста.
№ | Пользователь | Рейтинг |
---|---|---|
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 |
Привет всем!
ЗавтраСегодня в 19:00 MSK состоится Topcoder SRM 680.
Предлагаю обсудить задачи после контеста.
Название |
---|
without set up arena system,can i do this contest? as view as codeforces problem set and submit my code. if there any website please give this website.
How to solve div1 250 problem?
The constraints partition will if consistent partition the range from 1 to b into several buckets where each bucket contains a certain number of elements.
Within each bucket that number can then get arbitrarily divided up between even and odd numbers.
So basically you keep track of the biggest possible difference between odd and even and even and odd and if they can be zero then it's valid.
I also checked that a partity constraint is satisified.
There is also a nice trick where if you add a fake (b,n) constraint that simplifies conding somewhat.
Thanks!
Short editorials and my codes are on TopCoder website.
Congratulations for tourist, the only one to solve div1-hard!
Once again, good work Errichto, as soon as I read Limak, I thought it will be a good contest.
Knew it was you once I read bears.
Can you please tell why this approach fails?
Initially My state was dp[i][j] which represented is it possible to have j even numbers till i th sorted upto (Note If I know that there are j even numbers I also know the total numbers till i hence I know the number of odd numbers)!
Now I can know the maximum amount of choices of even number and odd numbers by checking the difference of upto[i] and upto[i-1].
It failed for 2 tests!
Then I changed it to simple dp[i][j][k] represents is it possible to form a set of numbers till i th sorted upto such that it contains exactly j even numbers and exactly k odd numbers..
Link
It fails too!
I cannot understand why any of my solution fails(obviously they are incorrect , but why?)
Thanks!!
If tourist is not first after coding, mostly hard fails or something happens that he regains his position. Hats off!