Help, I dreamed of a problem that I can't solve

Правка en1, от GomerDoGo, 2026-04-20 18:02:11

So, I was sleeping and this problem just came to me in a dream:

Given an array a and an array b, we need to split a into contiguous subsegments and for each subsegment assign 1/0 — whether we reverse it or not. The question: can we determine if it's possible to obtain b from a?

So far I only know how to solve it in O(n²), but there's clearly a better way, help pls

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
ru2 Русский GomerDoGo 2026-04-20 18:05:22 2
ru1 Русский GomerDoGo 2026-04-20 18:05:07 397 Первая редакция перевода на Русский
en1 Английский GomerDoGo 2026-04-20 18:02:11 442 Initial revision (published)