Пожалуйста, прочтите новое правило об ограничении использования AI-инструментов. ×

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

Автор Bullet, история, 32 часа назад, По-английски

We're thrilled to invite you to participate in our upcoming Brain Booster #6 programming contest at SeriousOJ.

Details:

Special thanks to CLown1331, owner of SeriousOJ.

Registration: Please register for the contest on SeriousOJ. If you encounter any issues on the register, be sure to check your spam folder for the confirmation email.

Good luck & Have fun!

Update: Congrats to the winners!

  1. alexwice

  2. sahaun

  3. penguin133

  4. flying_saucer

  5. SajidAbdullah

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

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

Hope all participants enjoy the problemset and have fun :)

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

Excited for this round !!

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

excited to participate in this contest

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

The problem set is thoughtfully designed and well-presented. We hope all participants will thoroughly enjoy this contest!

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

1 hour left for the contest....

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

ok

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

Very Much Excited for the contest & Hopefully for the "Plater"

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

Please consider adding rust to the list of available languages

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

Here is rough editorial incase anyone wants it

A: N/3 + (N%3 > 0)

B: xorsum

C: Say e evens o odds. Let q = min(e,o)//2*2. Game is same if (e-q, o-q) and lasts < 4 turns, so simulate.

D. dp[i] answer from position i. Lets maintain minat[d] = min(dp[i] for i if A[i]%d==0). Now for i=N-1..0 for d dividing A[i], we can update dp[i] by dp[i+1] + K, or (for d dividing A[i]) minat[d] + A[i]/d. Finally we can update minat[d].

E. Let dp[i][s] be the least cost to make s "abc"s from S[i:].

F. prefix xor sums, want P[i]^P[j] = P[j]^P[k], so for every P[i] = P[k] we add k — i — 1. For each P[i]=v lets info[v][0] += 1, info[v][1] += i. So that our answer increases by info[P[k]][0] * (k — 1) — info[P[k]][1].

G. For each position we want to know how many lower or higher on the left and right. We can use a fenwick tree and sort the queries. For the hard version we want mergesort tree.

H. segtree with lazy prop to support toggle. use euler tour to flatten the tree first and convert subtrees to subarrays.

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

Auto comment: topic has been updated by Bullet (previous revision, new revision, compare).