Acdream Mengzhu
http://acdream.info/problem?pid=1006
1 #include <cstdio> 2 #include <cmath> 3 #include <cstring> 4 #include <algorithm> 5 #define ll long long 6 #define maxn 10000 7 #define mod 10000000007 8 using namespace std; 9 10 double a,b; 11 int t; 12 13 int main() 14 { 15 scanf("%d",&t); 16 while(t--) 17 { 18 scanf("%lf%lf",&a,&b); 19 if(a-b>20) printf("%.5lf\n",a-1); 20 else printf("%.5lf\n",log2(pow(2,a-1)+pow(2,b-1))); 21 } 22 return 0; 23 }