Hello everyone!
TomorrowToday at 19:00 MSK will be held Topcoder SRM 680.
Let's discuss problems after contest.
# | 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 |
Hello everyone!
TomorrowToday at 19:00 MSK will be held Topcoder SRM 680.
Let's discuss problems after contest.
Name |
---|
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!