#include #include #include using namespace std; const int M=2010; int cas,n,m,k,i,j,a[M],A[M]; char s[20]; int main(){ scanf("%d",&cas); for (int Cas=1;Cas<=cas;Cas++){ memset(a,0,sizeof a); memset(A,0,sizeof A); scanf("%d%d%d",&n,&m,&k); for (i=1;i<=n;i++){ scanf("%s",s); for (j=0;j=k)ans++; } printf("Case #%d: %d\n",Cas,ans); } }