#include #include using namespace std; int main(){ int n; cin >> n; int a[n]; for(int i=0;i> a[i]; for(int i=1;ia[i-p]&&i-p