1625B - Elementary Particles The problem need us giving two same length sequence. Assuming the length of sequence is n. that one's index from 1 to n — 1, another from 2 to n. And two sequence at least exists one index position, make the value of same index is same and the length of sequence as large as possible.
Now that the value is same, we can enumberate the gived array, suppose a value A in array is correct answer. To find out same value B , calculating distance between B to last element in array and plus the distance between the first element to A. So we can summarize a formula. suppose lenA is the length that 0 to index of A lenB is the length that B to index of n ans = lenA + lenB



