Are there FLOW and MATCHING problems at IOI currently?
# | User | Rating |
---|---|---|
1 | ecnerwala | 3649 |
2 | Benq | 3581 |
3 | orzdevinwang | 3570 |
4 | Geothermal | 3569 |
4 | cnnfls_csy | 3569 |
6 | tourist | 3565 |
7 | maroonrk | 3531 |
8 | Radewoosh | 3521 |
9 | Um_nik | 3482 |
10 | jiangly | 3468 |
# | User | Contrib. |
---|---|---|
1 | maomao90 | 174 |
2 | awoo | 164 |
3 | adamant | 162 |
4 | TheScrasse | 159 |
5 | nor | 158 |
6 | maroonrk | 156 |
7 | -is-this-fft- | 151 |
8 | SecondThread | 147 |
9 | orz | 146 |
10 | pajenegod | 145 |
Name |
---|
By the other hand, big numbers arithmetic is excluded too, but one problem from IOI2011 cannot be solved without it.
Excluded: Real and complex numbers, general conics (parabolas,
hyperbolas, ellipses), trigonometric functions
You can read syllabus here. As I know, it's the most recent version.
Can you tell about it?
The idea:
UPD (source code):We split the input in maximum of 16 groups (32 bits each). So, with every parrot you transfer a group number (4 bits) and some number (4 bits - from 0 to 15). Now, we can pass the numbers and distinct the initial value of group by different combinations of counts of numbers from 0 to 15. How to count it? If we pass X numbers, then the amount of combunations is C(15+X, 15).
So, when the sum C(15,15) + C(16,15) + C(17,15) + ... is >= 2^32?
Counting until 34, the result is 4059928950, but until 35 - 7307872110, which is just enough. So on every group maximum of 20 numbers should be passed.
So, on every 4 bytes we need one group, so the ratio is: 20 * |` N / 4 `|. Which gets us ratio of 5. The problem is, if N is not divisible by 4 - we still need the same amount of groups, so the ratio gets slightly bigger than 5. However, if N is 63, not 64, the last group is not in range [0..2^32), but in range [0..2^24). If we assign our combinations cleverly, so that smaller number gets smaller amount of numbers to pass, the ratio of 5 is still present:
C(15,15) + ... + C(30,15) > 2^24
C(15,15) + ... + C(25,15) > 2^16
C(15,15) + ... + C(20,15) > 2^8
Now we need to get a bijection between combinations and actual numbers, but it can be done with DP, and the big number aritmetics is not needed here.
I can provide a source code, which I coded after IOI (on IOI I coded similar idea, only 64 groups (8 bits each) - that approach gives 98 points with a ratio of 7), if I can find that source code on one of the flash drives.
Encoder: http://codepad.org/Xer4MZ0q
Decoder: http://codepad.org/09R1OUHl
This solution has the same idea that mine (split into small groups and avoid big arithmetic).
Marvelous. I thought that it's impossible to improve in ints/long longs.