#include #include #define MIN(a,b) ((a)<(b)?(a):(b)) void run(void){ int c,n; scanf("%d%d",&c,&n); const int inf=1000000; int *dp=(int *)calloc(c+1,sizeof(int)); for(int i=1;i<=c;i++) dp[i]=inf; while(n--){ int a; scanf("%d",&a); for(int i=0;i