Can someone help me on upsolve ?

Правка en2, от papa-ka-para, 2023-06-11 22:40:53

I am trying to solve Problem D from CF-823(div-2).

https://mirror.codeforces.com/contest/1730/problem/D

I have written my doubts here, if anyone has time, please help me understand...

1) DOUBT 1

The editorial says,

If you reflect the second string and see what happens, it is easy to see that the elements at the same positions in both strings after any action remain at the same positions relative to each other.

What does "reflect" mean here ? does the editorial mean that reverse the second string ?

2) Doubt 2 ,

If the word reflect means reverse, then, according to the editorial,

the elements at the same positions in both strings after any action remain at the same positions relative to each other.

What does this even mean ?

Considering the below example, Suppose we have n = 8, and instead of calling S1 and S2, I am calling then string S and string T,

s1  s2  s3  s4  s5  s6  s7  s8
 |  |   |   |   |   |   |   | 
t1  t2  t3  t4  t5  t6  t7  t8

There is mapping between each one of the position and relative order initially matching with each other. 

Action 1 , K = 3
t6  t7  t7  s4  s5  s6  s7  s8
 |  |   |   |   |   |   |   | 
t1  t2  t3  t4  t5  s1  s2  s3

Action 2, K = 6

t3  t4  t5  s1  s2  s3  s7  s8
 |  |   |   |   |   |   |   | 
t1  t2  t6  t7  t7  s4  s5  s6 

Now as we can see, that t3 character and s3 character are part of the same string, now what relative order are we talking about here ?

What exactly is happening here ?

It definitely is not EASY to see , """ that the elements at the same positions in both strings after any action remain at the same positions relative to each other""" .

can someone please help me here ?

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский papa-ka-para 2023-06-11 22:40:53 4 Tiny change: 'efinitely not EASY ' -> 'efinitely is not EASY '
en1 Английский papa-ka-para 2023-06-11 22:39:56 1814 Initial revision (published)