#include using namespace std; bool isPrime(int x){ int count=0; int i=2; while(i<=sqrt(x)){ if(x%i==0){ count++; } i++; } if(count>=1){ return false; } return true; } long findmindiv(int x){ int i=2; do{ if(x%i==0){ return i; } i++; }while(i a) { int i=0,moves=0; for(i=0;i> 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; }