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

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

Last weekend the finals of Swedish Coding Cup took place. Results. Congrats to _h_ for winning!

The problems are available on Open Kattis; I think they are quite nice.

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

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

It looks like the reference solution to Ligatures uses SIMD. If possible, how would one solve it without SIMD?

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

    I'm embarrassed to admit that the intended solution is the quadratic time bitset one, and I don't know of any subquadratic one. It should be possible to do it with regular 64-bit numbers at most 4x slower than the 0,37 s AVX2-based one on the Kattis leaderboard, which should pass, though you might have to do a fair bit of constant factor optimization.

    (I think it's an interesting exercise though precisely how to apply bitsets here, IMO it's far from obvious.)

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

    How to see reference solution ?