#include <iostream> using namespace std; const int N = 1e7+5; const int MAXN = 1005; int n , m; int x[MAXN]; int a[N]; int main() { scanf("%d %d",&n , &m); for(int i = 0 ; i < m ; i++) cin >> x[i]; a[1] = x[0]; int now = 1 , pos = 1; int v = 0; while(pos < N) { f...