SHARE
TWEET

B ONI

jpvieiraa Mar 8th, 2019 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. int main(){
  4.     long int N,M,Q,i,j,contador;
  5.     scanf("%ld %ld",&N,&M);
  6.     long int D[M];
  7.     for(i=0;i<M;i++){
  8.         scanf("%ld",&D[i]);
  9.     }
  10.     scanf("%ld",&Q);
  11.     long int perguntas[Q];
  12.     for(j=0;j<Q;j++){
  13.         scanf("%ld",&perguntas[j]);
  14.         contador=0;
  15.         for(i=0;i<M;i++){
  16.             if(D[i]>=perguntas[j]){
  17.                 contador++;
  18.             }
  19.         }
  20.         printf("%ld\n",contador);  
  21.     }
  22.     return 0;
  23. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top