the difference easy hard version constraintsyou give sequence consist n positive integerslet define block palindrome sequence consist distinct element let element b equal b follow underbracea dot a_x underbraceb b dot b_y underbracea dot a_x there x y integer greater equal 0 for example sequence 2 1 1 1 2 1 1 2 2 1 1 1 2 1 1 block palindrome 1 2 3 2 1 1 2 1 2 1 1 2 notyour task choose maximum length subsequence block palindromeyou answer t independent test casesrecall sequence t subsequence sequence s t derive s remove zero element change order remain element for example s1 2 1 3 1 2 1 possible subsequence 1 1 1 1 3 1 2 1 3 1 2 1 3 2 3 1 1 1 1 2