//core code int a[10] = { 1,3,5,9,13,16,22,45,48,49 }; //寻找>=x的第一个位置 Find the first position >= x ,from left to right; int pos(int x,int l,int r) { int mid; while (l < r) { int mid = (r + l) >> 1; //为了避免死循环,也可以加1以后在除以2 //In order to avoid an infinite loop, //you can als...