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

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

We hope you enjoyed these problems!

2222A - A Wonderful Contest

Author: Lyz09

Hint 1
Tutorial
Implementation

2222B - Artistic Balance Tree

Author: lizhous

Hint 1
Tutorial
Implementation

2222C - Median Partition

Author: ma2021tyoi0037

Hint 1
Hint 2
Tutorial
Implementation

2222D - Permutation Construction

Author: Lyz09

Hint 1
Hint 2
Tutorial
Implementation

2222E - Seek the Truth

Author: Lyz09

Hint 1
Tutorial
Implementation

2222F - Building Tree

Author: hzy_____ Preparation: Rebex

Hint 1
Hint 2
Tutorial
Implementation

2222G - Statistics on Tree

Author: Lyz09 Developer: Z-301

Hint 1
Hint 2
Hint 3
Tutorial
Implementation

2222H - Counting Sort?

Author: CutieSmileHaruka

Hint 1
Hint 2
Hint 3
Tutorial
Implementation
  • Проголосовать: нравится
  • +4
  • Проголосовать: не нравится

»
115 минут назад, скрыть # |
 
Проголосовать: нравится +12 Проголосовать: не нравится

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

»
111 минут назад, скрыть # |
Rev. 2  
Проголосовать: нравится -28 Проголосовать: не нравится

[deleted]

»
72 минуты назад, скрыть # |
 
Проголосовать: нравится +4 Проголосовать: не нравится

yet another implementation round

»
63 минуты назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

In C i got to the point where median of segments = median of fulll array if it exists

the trick lies in where we can compute if median of a segment = M using the comparisons which are precomputed once we fix the median

Learned something new.

»
5 минут назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

my apparach for C

First, I precomputed the median for all prefix subarrays of odd size. Then for each recursive call, I enforced that prefix median onto the rest