#include using namespace std; long longestSequence(vector a) { // Return the length of the longest possible sequence of moves. int resp = 0; int soma = 0; for(int x=0; x> n; vector a(n); for(int a_i = 0; a_i < n; a_i++){ cin >> a[a_i]; } long result = longestSequence(a); cout << result << endl; return 0; }