.....

#include<stdio.h>
#include<vector>
#include<algorithm> 
using namespace std;
int main(){
   vector<int> gao1;
   int N,M; 
   scanf("%d%d",&N,&M); 
   int x; 
   for(int i=0;i<N;i++){
     scanf("%d",&x);
     gao1.push_back(x); 
   }
   sort(gao1.begin(),gao1.end()); 
   for(int i=0;i<M;i++){
      int x;
      scanf("%d",&x);
      vector<int>::iterator it=lower_bound(gao1.begin(),gao1.end(),4);
      if(it==gao1.end())puts("not found");
      else printf("%d\n",*it); 
   } 

} 

 

posted on 2014-08-04 15:58  michaeljunlove  阅读(125)  评论(0)    收藏  举报

导航