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

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

A

Idea:MathModel

Hints
Analysis
code(Python)

B

Idea:MathModel

solution
code

C

Idea:imranakki

solution
code(C++)

D

Idea:MathModel

short solution
Very Long Analysis
code

E

Idea:wuhudsm

The intended solution is $$$O(n)$$$.

solution
code(C++)

F

Idea:wuhudsm

solution
code

G

Idea:Timosh

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

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

E can likely be solved with SQRT tree in O(n log log n)/O(1)

which is a shame because I didn’t have that prepared and only have a block-disjoint sparse table of O(n log n/B)/O(B) which is unfortunately not fast enough (maybe it is fast enough in C++, idk)

Update: Unfortunately, the AI-translated natural divide and conquer approach passed, with room to spare, 288002439