Fisa Flood (UVA 13052) by aizu_f
Contest: 3738    RunID: 20174046    Status: Presentation error    Date: Sat Oct 14 15:06:36 JST 2017


#include <bits/stdc++.h>
#include<set>
#include<algorithm>
#include<cmath>
#include<sstream>
#include<stdio.h>
#define INF 100000000
#include<map>
#define pb push_back
#define ll long long int
#define inf 2000000000
#define pi (2.0 * acos(0.0))
#define ssort(v) sort(v.begin(), v.end())
#define ull unsinged long long int
#define mem(a, b) memset(a, b, sizeof(a))
#define mm 100009 
using namespace std;
int main() {
	int t, a, b, i, j;
	scanf("%d", &t);
	int tt = 0;
	while(t-- >0){
		cin >> a >> b;
		if(a == 0 && b == 0) {
			printf("Case %d: 0.000 0.000\n", ++tt);
		}else if(b  % 2 == 1) {
			printf("Case %d: 0.000 1.000\n", ++tt);		
		}else{
			printf("Case %d: 1.000 0.000", ++tt);
		}
	}
	return 0;
}