Bullet's blog

By Bullet, history, 2 months ago, In English

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

  • Vote: I like it
  • +14
  • Vote: I do not like it

»
2 months ago, # |
  Vote: I like it +10 Vote: I do not like it

Hope all participants enjoy the problemset and have fun :)

»
2 months ago, # |
  Vote: I like it +1 Vote: I do not like it

Excited for this round !!

»
2 months ago, # |
  Vote: I like it +1 Vote: I do not like it

excited to participate in this contest

»
2 months ago, # |
  Vote: I like it +1 Vote: I do not like it

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

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

1 hour left for the contest....

»
2 months ago, # |
  Vote: I like it +1 Vote: I do not like it

ok

»
2 months ago, # |
  Vote: I like it +1 Vote: I do not like it

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

»
2 months ago, # |
  Vote: I like it +1 Vote: I do not like it

Please consider adding rust to the list of available languages

»
2 months ago, # |
  Vote: I like it +5 Vote: I do not like it

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.

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

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