Блог пользователя FBI

Автор FBI, история, 2 года назад, По-английски

Today, the problem G2 could be solved in an extravagant way, using randomized xor-hashing, I am not quite sure what is the chance that I will get hacked,so please feel free to either try and hack my solution, or write a comment describing approximated chance of my random getting hacked. (If you do come up with the approximation, i will edit the blog to include your statement)

Here`s the submission 238069601

UPD: My solution turned out to be the one that is the main one

  • Проголосовать: нравится
  • +73
  • Проголосовать: не нравится

»
2 года назад, скрыть # |
 
Проголосовать: нравится +60 Проголосовать: не нравится

You can't hack the FBI.

»
2 года назад, скрыть # |
 
Проголосовать: нравится -53 Проголосовать: не нравится

The probabilty is analogous to the following — Among n people, the probability that atleast 2 have same birthday.

Its formula is well known. To approximate the value in this case , I found an upper bound on the probability by using identity e^x = (1+x/n)^n for large n ( in this case ~1e18) it turns out that probability of this happening is of the order of 1e-7 ie almost 0 Note that if we use int instead of long long for hashing the probability is of the order of e^400 ie it is guaranteed that the solution will not work

If there is some mistake, please point it out

»
2 года назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

Can you please explain your solution?

  • »
    »
    2 года назад, скрыть # ^ |
     
    Проголосовать: нравится 0 Проголосовать: не нравится

    I will try, but i am bad at explaining, the part with XOR-hashing is there just for finding the segments that are isolated (for every a_i in that segment, the other element that equals a_i is also in that segment).

    After that, we have a list of those segments (also you have to understand that for all pairs of segments they can be either non-intersecting, or one is inside of the other).

    After finding all segments you can see that the result is minimal cover of the array, that is a well-known problem (but actually I overlooked that dp solution and understood it only now), the second part is a little bit tricky, because for every isolated segment that is included in final minimal answer, we can start by choosing any element that is covered ONLY by that segment.

    Now we calculate number of those elements for every chosen segment, after that the final answer is just the product of those numbers

»
2 года назад, скрыть # |
 
Проголосовать: нравится +19 Проголосовать: не нравится

i think it will be very hard to hack a lgm so orz

»
2 года назад, скрыть # |
 
Проголосовать: нравится +32 Проголосовать: не нравится

Hacked THE FBI using HTML!

»
2 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

you can refer here.