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

Автор I_love_Hoang_Yen, 7 лет назад, По-английски

UPD: Editorial in Vietnamese: http://acmicpc-vietnam.github.io/2016/regional/solutions/ACMICPCRegionalVietnam2016-Editorial.pdf

Hi all,

On Oct 15th, 7pm Vietnamese time, we will have Vietnamese regional 2016 replay on Kattis.

  • The contest will last for 5 hours with normal ACM ICPC rules.
  • After the contest we'll publish editorial in Vietnamese and official solutions.
  • Teams are recommended.
  • It is not rated.

If you are not afraid of spoilers, see standings here. Team from Seoul National Univ were #3 in ACM ICPC World final 2016-2017 and LINUX from VNU were #39 in World final 2016-2017. Can you beat them? :p

The problems were prepared by I_love_Hoang_Yen, ngfam_kongu, lythanh, khuebeo and some professors in Vietnam. The contest is uploaded to Kattis by I_love_tigersugar.

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

»
7 лет назад, # |
  Проголосовать: нравится +17 Проголосовать: не нравится

Could you please remove the LINUX's position from your blog post so that members of that team don't feel ashamed of their terrible performance at World-Finals-2017? :'(

»
7 лет назад, # |
Rev. 4   Проголосовать: нравится +5 Проголосовать: не нравится

What I get for problem I:

Call f(x) the number of times that we can replace x which x / p where p is a prime. Then number x is equivalent to a pile of f(x) stones in a Misere game. The whole problem reduced to finding the number of subsequences such that their exclusive-or sum is 1, which is an easy DP problem.

What I didn't is that how to compute f(x) quickly (and I think most of the teams stuck here, too). Any idea?

  • »
    »
    7 лет назад, # ^ |
    Rev. 6   Проголосовать: нравится 0 Проголосовать: не нравится

    You can solve it like this: To calculate f[x]: For each prime <= 10^4, you can brute-force to count this part, and divide x for any of them. After this, any prime divisor of x will > 10^4, so x have at most 2 prime divisor. Use something like Fermat's little theorem or Miller–Rabin to check if x is a prime, then you're done.

    There are 1229 primes < 10^4, so I think this algorithm will have enough time to run. You can also do something like stop trying if x is greater than current prime^2, have a table for x<10^6 so you can look it up whenever x<10^6, ... . Because all the number we care about is >=a and <=b, so it's hard to give a and b such that it's take too long to calculate the whole sequence.

    Despite saying all that, I can't guarantee that this algorithm will pass. And I couldn't come up with your idea :(.

  • »
    »
    7 лет назад, # ^ |
      Проголосовать: нравится +13 Проголосовать: не нравится

    Let g[x] = x for x = [A, B]. For each prime p ≤ 106. Find the smallest st: p|C and do as follow:

    for (long long i = C; i <= B; i += p) {
        while (g[i] % p == 0) g[i] /= p, f[i]++;
    }
    
  • »
    »
    7 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    i found out the way to calculate f(x) but didn't know about misere :(

»
7 лет назад, # |
Rev. 2   Проголосовать: нравится +10 Проголосовать: не нравится

That Van Hanh Pham solved 10 out of 12 problems and the 2 problems he did not bother to solve are those almost everyone could solve. Does that means he alone could beat the best team from Seoul National University?

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

Is there any way to see the running time when submitting as a spectator?