Here's the link http://www.codechef.com/problems/CARVANS
include<stdio.h>
int main() { int t, c[100], n, d, ctr, i, j;
scanf("%d", &t);
while (t--)
{
ctr = 1;
scanf("%d", &n);
for (i = 0; i < n; i++)
scanf("%d", &c[i]);
for (i = 0, j = 1; j < n; i++, j++)
{
d = c[i] - c[j];
if (d >= 0)
ctr++;
else
continue;
}
printf("%d\n", ctr);
}
return 0;
}