1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
#include <iostream>
#include <cstdio>
using namespace std;
int main(){
int T, kasus = 0;
scanf( "%u", &T );
while ( T-- ){
int n, m, arr[10005], answer, a, b;
kasus = kasus++;
scanf( "%u %u", &n, &m);
printf( "Kasus #%u:",kasus );
for(int i=0; i < n; i++){
scanf( "%u", &arr[i] );
}
for(int i=0; i < m; i++){
answer = 0;
scanf( "%u %u", &a, &b);
for(int j=0; i < n; i++){
if ( arr[j] < b && arr[j] > a ){
answer = answer++;
}
printf( "%u\n", &answer );
}
}
}
return 0;
}
|