physics0523's blog

By physics0523, history, 11 months ago, In English

104855A - GCD,LCM and AVG

Editorial
Rate the problem

104855B - Yugandhar's Letter for Diya

Editorial
Rate the problem

104855C - Hungry Shark

Editorial
Rate the problem

104855D - Colorful Paths

Editorial
Rate the problem

104855E - Perfect Permutation

Editorial
Rate the problem

104855F - Regular Covering

Editorial
Rate the problem



Appendix: Code for all problems
  • Vote: I like it
  • +16
  • Vote: I do not like it

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Thank you for the problems!

»
11 months ago, # |
Rev. 3   Vote: I like it +13 Vote: I do not like it

I did a random solution in problem A, now I know it's much easier.

I did a sieve up to $$$10^6$$$, then I choose 3 primes randomly between the 101st and the 78401st prime, and asked 3 queries. So I took the maximum of 3 answers divided by the prime. solution

It works because the probability of some number less than $$$10^9$$$ have some prime number less than $$$10^6$$$ and greater than $$$541$$$ (the 101st prime) as factor is something like $$$3/78300$$$, so the probability of get the right answer in each $$$10000$$$ tests is something like $$$(1 - (\frac{3}{78300})^3)^{10000} \approx 1-5.6\cdot 10^{-10}$$$