#include using namespace std; typedef long long unsigned llu; typedef long long ll; llu solve ( llu x) { cout< a) { // Return the length of the longest possible sequence of moves. llu size=a.size(),ans=0; for ( llu i=0;i> n; vector a(n); for(llu a_i = 0; a_i < n; a_i++){ cin >> a[a_i]; } llu result = longestSequence(a); cout << result << endl; return 0; }