///將面試人按順序分組,每組錄取一個,找到最小的分組數是的錄取能力總和大於k # include# include # include # include # include using namespace std; int a1[200010]; int dp[200010][20]; int n; void RMQ_init() { for(int i=1; i<=n; i++) dp[i][0]=a1[i]; int k=(int)(log(n+1.0)/log(2.0)); for(int j=1; j<=k; j++) for(int i=1; i+(1< k) break; pre=len; temp=m; } if(i==n+1) printf("-1\n"); else printf("%d\n",i); } } return 0; }