#include #define X first #define Y second #define pb push_back #define mp make_pair #define SZ(X) (X.size()) #define mst(a,b) memset((a),(b),sizeof(a)) #define lowbit(a) ((a)&(-a)) using namespace std; typedef long long LL; typedef long long ll; typedef pair pii; typedef pair pll; const int N = 5e5 + 10; const int mod = 1e9+7; const int inf = 0x3f3f3f3f; const LL INF = 1LL << 61; const int maxn=(1<<10)+10; int a[maxn],cnt[maxn]; int main() { #ifdef local freopen("in.txt", "r", stdin); #endif // local // ios::sync_with_stdio(0); // cin.tie(0); // cout.tie(0); int T,cas=1; scanf("%d",&T); while (T--){ int n,m,k; scanf("%d%d%d",&n,&m,&k); mst(a,0); for (int i=0;i=k) ans++; } printf("Case #%d: %d\n",cas++,ans); } return 0; }