#include <iostream> #include <unordered_set> #include <vector> #include <set> using namespace std; int main() { int n = 0; cin >> n; vector<int> v(n); for (int i=0;i<n;++i) { cin >> v[i]; } vector<int> dp(n,1); i...