#include #include #include #include #include using namespace std; int a[10005], b[10005]; int res, pre, as[10005]; bool cmp(int x, int y) { return x>y; } int main() { int n, m, an, bn, t=1, ca, i, end, lef, tmp; scanf("%d", &ca); while(ca-->0) { scanf("%d%d%d%d", &n, &m, &an, &bn); for(i=0; ires)res=tmp; } printf("Case #%d: %d\n", t++, res); } return 0; }