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

Автор UTPC_Admin, история, 18 месяцев назад, По-английски

Hope you enjoyed our contest! The editorial is below:

A — Fishy Tank

Author: DylanSmith
Idea: fishy15

Solution

B — Card Counting

Author: tn757

Solution

C — Balloon Fiesta

Author: DylanSmith

Solution

D — City Renewal

Author: GhOsT16790

Solution

E — Cable Plan

Author: mwen
Editorial: DylanSmith

Solution

F — Night Ride

Author: m7a1g5i8k8a1r4p0

Solution

G — Music Festival

Author: fishy15

Solution

H — Lineism

Author: RandyG

Solution

I — Game, Set, Match

Author: bubbarob19

Solution

J — Security Breach

Author: ChiMasterBing

Solution

K — Philadelphia Museum of Art

Author: zmonster8

Solution

L — Trapped in the Big Apple

Author: WalrusRamen21

Solution

M — Tea Party

Author: meize

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

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

For C, after processing with suffix automaton, you can maintain all adjacent differences of positions during small-to-large merging. There are $$$O(\sqrt n)$$$ different such values for each node, so this has complexity $$$O(n\cdot\sqrt n)$$$ while being very easy to code.